Could not load python3.5m...

35 views
Skip to first unread message

dada...@gmail.com

unread,
Feb 22, 2017, 12:46:31 PM2/22/17
to Python For Android
I have created a apk with p4a. I have then installed the package on a android device. When launching, I've got a python error :
Could not load python3.5m...

I have used this command :
p4a apk --private $HOME/prog/flask/app --package=org.exemple.test --name "first WebView Application" --version 0.1 --bootstrap=webview --requirements=flask --port=5000 --arch=armeabi-v7a

So it's a Flask app, I have used python2.7 on a debian 8 to compile with Android API 21

dada...@gmail.com

unread,
Feb 23, 2017, 5:37:07 AM2/23/17
to Python For Android
Looking in the logcat, we go deeper in the python library loading issue :

D/dalvikvm( 3181): Trying to load lib /data/app-lib/org.exemple.test-1/libpython2.7.so 0x40da7ab0
E/dalvikvm( 3181): dlopen("/data/app-lib/org.exemple.test-1/libpython2.7.so") failed: Cannot load library: soinfo_link_image(linker.cpp:1673): could not load library "libsqlite3.so" needed by "libpython2.7.so"; caused by load_library(linker.cpp:771): library "libsqlite3.so" not found
W/System.err( 3181): Couldn't load python3.5m from loader dalvik.system.PathClassLoader[dexPath=/data/app/org.exemple.test-1.apk,libraryPath=/data/app-lib/org.exemple.test-1]: findLibrary returned null


but the files are there (looking in the shell) :

ls -l /data/app-lib/org.exemple.test-1/
-rwxr-xr-x system   system      22000 2017-03-23 08:40 libmain.so
-rwxr-xr-x system   system    1808100 2017-03-23 08:40 libpython2.7.so
-rwxr-xr-x system   system     524848 2017-03-23 07:40 libsqlite3.so

dada...@gmail.com

unread,
Feb 24, 2017, 7:54:43 AM2/24/17
to Python For Android
I found, not the solution, but the beginning of the explanation while testing with virtual devices..

Basically, my package only runs on device with level of API higher than 18.. if not (for exemple my hardware device runs 17 API), I have this weird message reference to python 3.5..

Alexander Taylor

unread,
Feb 25, 2017, 1:48:10 PM2/25/17
to Python For Android
Thanks for the report, I'm not sure what's wrong and I don't think I've come across any Android version dependency quite like this.

The message referring to python 3.5 arises from the order p4a tries to load libraries, but it's certainly confusing. That part should be fixed in master, I think.
Reply all
Reply to author
Forward
0 new messages