-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Older android version can't load libraries properly #925
Comments
Seems to be some kind of issue with loading Anyway, last time I've compiled
Also, I'm not familiar with using I'd like to recommend you the
Put apps into /sdcard/kivy/ as it's stated in the docs. |
I have compiled sdl2-launcher , but same Error appeared.
The bug implemented due compiling or it contained in parent parts of which there is a compilation , because the same error occurs in any other apk that I build with requirement=sqlite3. |
Ok, let's work with sdl2 launcher as people here kind of work rather directly with app packaging than launcher (and I really push this PR to be merged 😋 ), so if something is broken related to launcher, I'll probably need to fix it. I tried sqlite3 with the test app, worked, so I presume the error is somewhere hidden. I opened the
Check if there's still something in
and create launcher from the test file with sqlite3 in requirements (don't forget commas + no comma at the end of requirements string). |
After make all changes described before the Same Error appear again. But I used this script for compile Logcat:
I found the "libsqlite3.so" in the apk "/lib/armeabi/libsqlite3.so ". Why it can`t be loaded? I have four applets for the KivyLauncher. All of them not work with my Launcher. But all of them work with Launcher from PlayMarket. |
I seriously have no Idea what's wrong with Why you see the py3.5 error is basically because py2 wasn't loaded. And it wasn't loaded because something's wrong with your Just an idea, but if it works with the store Launcher, try to copy&paste the Any thoughts what might be wrong, @inclement ? |
I have got a clue !
Long log:
Maybe it is my device or soft on it has some bugs (but earlier I could to compile apk without errors, about a year ago)? ASUS me173x, android 4.2.2 |
Downloaded the same example (KivyPictures) and it works without problems. I have 4.4.2 too. Reading the specs of your device and comparing with mine there's only SDK difference (you have higher needed one or something). Also, I work with the Crystax NDK now, but when I worked with pygame launcher, I used Clean the p4a builds and dists (should be enough now) and when building, increase the switch To test if you might want to use Crystax, install this custom test app. If it runs, it's most likely able to load |
I have a question about build-options: 'android-api' and 'minsdk'. Android api - it is clear. But for 'minsdk' I need to set the api number or the sdk-revision-number ? |
crystax NDK work, but on device raise an error:
|
For experiment I have reinstalled all (Kivy , buildozer, cython, p4a). Old error is remained. In buildozer file I have checked the parameter:
But new issue appeared:
Why it is occure ? |
That's the same as android-api, but targets the minimum required one. I don't remember how does it work, but I think it uses the lowest one e.g. if minimum is re the buildozer error: I think there should be a string, like in casual python -> re the logcat error: Have you tried to use pygame? It built for me correctly and ran too, but that was like... few months ago and I tried only with casual SDK, not with crystax, but it should work anyway. The error is about missing Sorry for the delayed reply. |
Thanks for answer. It is pleasant than somebody pay attention for my problem.
No. I do not know how to set pygame in buildozer. With p4a tried but some error occured too. I have found presumptive reason of the error with *.so One of the solutions is to use android API System.loadLibrary("library_name") in my program. I think that pyjnius must be used for this purpose with command
But I do not know where to place this code. The second solution is to use java package ReLinker |
Can't help you with When you create a
yet I'm not quite sure how sqlite is loaded anyway. If this is the same thing as with Edit: the |
Oh my god !!! I have included the "sqlite3" to the 13th line of PythonUtil.java |
Good. If you manage to not break it with |
Can`t to understand what is happening....
But not with python:
|
There's a difference between |
I just wanted to say that android sees these libraries, then he is not guilty. |
I thought your issue was solved with placing sqlite to PythonUtil.java What is the problem now? |
python can`t do command: |
I'm not sure what's hapenning, because in my compiled version there's only |
It contained in |
It seems that for some reason old android versions (4.1.2 for me) can't dynamically load .so libraries. A bare python is launching for the reason that it is forced to load in PythonUtil.java. As for 05.02.2017 it is written so that when python2.7 fails to load it tries to load python3 module which doesn't exist for python2 app and throw exception for python3 module. With this behaviour it is hard to debug the problem when python2.7 module is not loading. I suggest pull request which can help people with old android devices to realise the problem. P.S. at the moment I don't know how to make old android to load libraries other way than force them to load in PythonUtil.java |
I am experiencing the same issue, having tried several NDK/SDK combinations including Crystax.
That was with python3crystax |
Closing as probably fixed by various corrections to library loading within the last couple of years. |
I have compile the KivyLauncher to APK with p4a :
clean_dists&& p4a clean_builds&& p4a apk --requirements=sqlite3,hostpython2,plyer,kivy --package=org.test.launcher --name="Launcher" --version=0.0.1 --android_api 17 --bootstrap=pygame --launcher --permission WRITE_EXTERNAL_STORAGE --permission READ_EXTERNAL_STORAGE --permission ACCESS_CHECKIN_PROPERTIES --permission CAMERA --permission EXPAND_STATUS_BAR
All compiled perfect. But when I run programm in Launcher the Error occures. I do not know what to do . Please, tell me where may be the bug ?
ERROR:
11-13 00:50:16.050: I/ActivityManager(465): START u0 {act=org.renpy.LAUNCH dat=kivy:/storage/emulated/0/kivy/trade_sql cmp=org.test.launcher/org.renpy.android.PythonActivity} from pid 6181 11-13 00:50:16.169: I/ActivityManager(465): Start proc org.test.launcher:python for activity org.test.launcher/org.renpy.android.PythonActivity: pid=6208 uid=10114 gids={50114, 1015, 1028, 1006} 11-13 00:50:16.255: V/ActivityManager(465): Binding process pid 6208 to record ProcessRecord{42b3e7b8 6208:org.test.launcher:python/u0a10114} 11-13 00:50:16.257: V/ActivityManager(465): New app record ProcessRecord{42b3e7b8 6208:org.test.launcher:python/u0a10114} thread=android.os.BinderProxy@42738e90 pid=6208 11-13 00:50:16.417: V/ActivityManager(465): ACT-Launching: ActivityRecord{427c27c8 u0 org.test.launcher/org.renpy.android.PythonActivity} 11-13 00:50:16.773: D/dalvikvm(6208): Trying to load lib /data/app-lib/org.test.launcher-1/libpython2.7.so 0x421912c8 11-13 00:50:16.774: E/dalvikvm(6208): dlopen("/data/app-lib/org.test.launcher-1/libpython2.7.so") failed: Cannot load library: soinfo_link_image(linker.cpp:1635): could not load library "libsqlite3.so" needed by "libpython2.7.so"; caused by load_library(linker.cpp:745): library "libsqlite3.so" not found 11-13 00:50:16.786: V/WindowManager(465): Changing focus from null to Window{42c3c708 u0 org.test.launcher/org.renpy.android.PythonActivity} 11-13 00:50:16.791: E/AndroidRuntime(6208): java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_link_image(linker.cpp:1635): could not load library "libsqlite3.so" needed by "libpython2.7.so"; caused by load_library(linker.cpp:745): library "libsqlite3.so" not found 11-13 00:50:16.791: E/AndroidRuntime(6208): at org.renpy.android.PythonActivity.run(PythonActivity.java:254) 11-13 00:50:17.069: I/WindowManager(465): Gaining focus: Window{42c3c708 u0 org.test.launcher/org.renpy.android.PythonActivity} 11-13 00:50:17.207: W/ActivityManager(465): Force finishing activity org.test.launcher/org.renpy.android.PythonActivity 11-13 00:50:17.210: V/WindowManager(465): Changing focus from Window{42c3c708 u0 org.test.launcher/org.renpy.android.PythonActivity} to null 11-13 00:50:17.218: I/WindowManager(465): Losing focus: Window{42c3c708 u0 org.test.launcher/org.renpy.android.PythonActivity} 11-13 00:50:17.549: V/ActivityManager(465): Enqueueing pending finish: ActivityRecord{427c27c8 u0 org.test.launcher/org.renpy.android.PythonActivity} 11-13 00:50:17.623: D/AES(465): process : org.test.launcher:python 11-13 00:50:17.628: D/AEE/LIBAEE(465): shell: raise_exp(2, 6208, -1361051648, org.test.launcher:python, 0x0x59762008, 0x0x0) 11-13 00:50:18.211: W/InputDispatcher(465): channel '42c3c708 org.test.launcher/org.renpy.android.PythonActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9 11-13 00:50:18.211: E/InputDispatcher(465): channel '42c3c708 org.test.launcher/org.renpy.android.PythonActivity (server)' ~ Channel is unrecoverably broken and will be disposed! 11-13 00:50:18.211: I/ActivityManager(465): Process org.test.launcher:python (pid 6208) has died. 11-13 00:50:18.217: I/WindowState(465): WIN DEATH: Window{42c3c708 u0 org.test.launcher/org.renpy.android.PythonActivity} 11-13 00:50:18.217: W/InputDispatcher(465): Attempted to unregister already unregistered input channel '42c3c708 org.test.launcher/org.renpy.android.PythonActivity (server)' 11-13 00:50:18.217: W/WindowManager(465): Force-removing child win Window{42c981e8 u0 SurfaceView} from container Window{42c3c708 u0 org.test.launcher/org.renpy.android.PythonActivity}
The text was updated successfully, but these errors were encountered: