Skip to content

apk with sqlite3 python3 kivy No module named '_sqlite3' #1564

Closed
@allaboutmikey

Description

@allaboutmikey

Ran into problems with making an APK, mostly due to incorrect software and api versions. The last of those (unable to find a valid dependency graph) was solved over in #1222

Now my APK compiles fine: and crashes on load. The problem is it can't find the _sqlite3 module. The latest pythonforandroid has a recipe for sqlite3 which seems to compile just fine. It produces a libsqlite3.so file which is included in my APK (checked), but this doesn't seem to be what python is looking for when the app loads on the device.
I am able to run the rest of the app if I remove the import and use of the sqlite3 module, but it is critical to most of the functionality in the final version that sqlite3 work.

I have tried removing from blacklist.txt (wherever I could find one, there were several) any mention of sqlite3 files: no change.
I have tried whitelisting sqlite3 files in buildozer.spec: no change.
I have tried completely removing the .buildozer directory and allowing it all to re-downlooad/install/compile: no change.
Love some help if anyone has ideas.

Edit:
Just found in MyProject/.buildozer/android/platform/build/build/other_builds/python3/armeabi-v71__ndk_target_21/python3/android_build/config.log a mention of sqlite3 that looks like:

configure:10267: checking for --enable-loadable-sqlite-extensions
configure:10277: result: no

Does this mean sqlite is not being built into python3? Not sure how I would change this as buildozer is doing all the p4a stuff for me.

Edit 2:
Further research tells me that option is not required to get sqlite3 working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions