question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Kivy crashes on Android: ImportError: dlopen failed.

See original GitHub issue

Versions

  • Python: 3.7
  • OS: Android
  • Kivy: 1.11.0.dev0
  • Kivy installation method: Installed by git clone and using a custom path in buildozer.specs requirements.source.kivy = ~/projects/kivy-apps/rextester/kivy

Description

I can’t make the app run on my android phone. It works on my pc but on my phone this error comes up: ImportError: dlopen failed: "/data/data/demo.org.rextesterdroid/files/app/_python_bundle/site-packages/kivy/_clock.so" is 64-bit instead of 32-bit

Logs

04-30 11:57:33.349 16065 16065 V pythonutil: Checking pattern libcrystax\.so against libsqlite3.so
04-30 11:57:33.349 16065 16065 V pythonutil: Checking pattern libcrystax\.so against libSDL2_image.so
04-30 11:57:33.350 16065 16065 V pythonutil: Checking pattern libcrystax\.so against libhidapi.so
04-30 11:57:33.350 16065 16065 V pythonutil: Checking pattern libcrystax\.so against libffi.so
04-30 11:57:33.350 16065 16065 V pythonutil: Checking pattern libcrystax\.so against libpython3.7m.so
04-30 11:57:33.350 16065 16065 V pythonutil: Checking pattern libcrystax\.so against libmain.so
04-30 11:57:33.350 16065 16065 V pythonutil: Checking pattern libcrystax\.so against libSDL2_mixer.so
04-30 11:57:33.351 16065 16065 V pythonutil: Checking pattern libcrystax\.so against libSDL2_ttf.so
04-30 11:57:33.351 16065 16065 V pythonutil: Checking pattern libcrystax\.so against libssl1.1.so
04-30 11:57:33.351 16065 16065 V pythonutil: Checking pattern libcrystax\.so against libSDL2.so
04-30 11:57:33.351 16065 16065 V pythonutil: Checking pattern libcrystax\.so against libcrypto1.1.so
04-30 11:57:33.353 16065 16065 V pythonutil: Checking pattern libsqlite3\.so against libsqlite3.so
04-30 11:57:33.353 16065 16065 V pythonutil: Pattern libsqlite3\.so matched file libsqlite3.so
04-30 11:57:33.354 16065 16065 V pythonutil: Checking pattern libsqlite3\.so against libSDL2_image.so
04-30 11:57:33.354 16065 16065 V pythonutil: Checking pattern libsqlite3\.so against libhidapi.so
04-30 11:57:33.354 16065 16065 V pythonutil: Checking pattern libsqlite3\.so against libffi.so
04-30 11:57:33.354 16065 16065 V pythonutil: Checking pattern libsqlite3\.so against libpython3.7m.so
04-30 11:57:33.354 16065 16065 V pythonutil: Checking pattern libsqlite3\.so against libmain.so
04-30 11:57:33.354 16065 16065 V pythonutil: Checking pattern libsqlite3\.so against libSDL2_mixer.so
04-30 11:57:33.355 16065 16065 V pythonutil: Checking pattern libsqlite3\.so against libSDL2_ttf.so
04-30 11:57:33.355 16065 16065 V pythonutil: Checking pattern libsqlite3\.so against libssl1.1.so
04-30 11:57:33.355 16065 16065 V pythonutil: Checking pattern libsqlite3\.so against libSDL2.so
04-30 11:57:33.355 16065 16065 V pythonutil: Checking pattern libsqlite3\.so against libcrypto1.1.so
04-30 11:57:33.357 16065 16065 V pythonutil: Checking pattern libffi\.so against libsqlite3.so
04-30 11:57:33.357 16065 16065 V pythonutil: Checking pattern libffi\.so against libSDL2_image.so
04-30 11:57:33.357 16065 16065 V pythonutil: Checking pattern libffi\.so against libhidapi.so
04-30 11:57:33.357 16065 16065 V pythonutil: Checking pattern libffi\.so against libffi.so
04-30 11:57:33.358 16065 16065 V pythonutil: Pattern libffi\.so matched file libffi.so
04-30 11:57:33.358 16065 16065 V pythonutil: Checking pattern libffi\.so against libpython3.7m.so
04-30 11:57:33.358 16065 16065 V pythonutil: Checking pattern libffi\.so against libmain.so
04-30 11:57:33.358 16065 16065 V pythonutil: Checking pattern libffi\.so against libSDL2_mixer.so
04-30 11:57:33.358 16065 16065 V pythonutil: Checking pattern libffi\.so against libSDL2_ttf.so
04-30 11:57:33.359 16065 16065 V pythonutil: Checking pattern libffi\.so against libssl1.1.so
04-30 11:57:33.359 16065 16065 V pythonutil: Checking pattern libffi\.so against libSDL2.so
04-30 11:57:33.359 16065 16065 V pythonutil: Checking pattern libffi\.so against libcrypto1.1.so
04-30 11:57:33.361 16065 16065 V pythonutil: Checking pattern libssl.*\.so against libsqlite3.so
04-30 11:57:33.361 16065 16065 V pythonutil: Checking pattern libssl.*\.so against libSDL2_image.so
04-30 11:57:33.361 16065 16065 V pythonutil: Checking pattern libssl.*\.so against libhidapi.so
04-30 11:57:33.361 16065 16065 V pythonutil: Checking pattern libssl.*\.so against libffi.so
04-30 11:57:33.362 16065 16065 V pythonutil: Checking pattern libssl.*\.so against libpython3.7m.so
04-30 11:57:33.362 16065 16065 V pythonutil: Checking pattern libssl.*\.so against libmain.so
04-30 11:57:33.362 16065 16065 V pythonutil: Checking pattern libssl.*\.so against libSDL2_mixer.so
04-30 11:57:33.362 16065 16065 V pythonutil: Checking pattern libssl.*\.so against libSDL2_ttf.so
04-30 11:57:33.362 16065 16065 V pythonutil: Checking pattern libssl.*\.so against libssl1.1.so
04-30 11:57:33.362 16065 16065 V pythonutil: Pattern libssl.*\.so matched file libssl1.1.so
04-30 11:57:33.363 16065 16065 V pythonutil: Checking pattern libssl.*\.so against libSDL2.so
04-30 11:57:33.363 16065 16065 V pythonutil: Checking pattern libssl.*\.so against libcrypto1.1.so
04-30 11:57:33.364 16065 16065 V pythonutil: Checking pattern libcrypto.*\.so against libsqlite3.so
04-30 11:57:33.364 16065 16065 V pythonutil: Checking pattern libcrypto.*\.so against libSDL2_image.so
04-30 11:57:33.364 16065 16065 V pythonutil: Checking pattern libcrypto.*\.so against libhidapi.so
04-30 11:57:33.364 16065 16065 V pythonutil: Checking pattern libcrypto.*\.so against libffi.so
04-30 11:57:33.364 16065 16065 V pythonutil: Checking pattern libcrypto.*\.so against libpython3.7m.so
04-30 11:57:33.365 16065 16065 V pythonutil: Checking pattern libcrypto.*\.so against libmain.so
04-30 11:57:33.365 16065 16065 V pythonutil: Checking pattern libcrypto.*\.so against libSDL2_mixer.so
04-30 11:57:33.365 16065 16065 V pythonutil: Checking pattern libcrypto.*\.so against libSDL2_ttf.so
04-30 11:57:33.365 16065 16065 V pythonutil: Checking pattern libcrypto.*\.so against libssl1.1.so
04-30 11:57:33.365 16065 16065 V pythonutil: Checking pattern libcrypto.*\.so against libSDL2.so
04-30 11:57:33.366 16065 16065 V pythonutil: Checking pattern libcrypto.*\.so against libcrypto1.1.so
04-30 11:57:33.366 16065 16065 V pythonutil: Pattern libcrypto.*\.so matched file libcrypto1.1.so
04-30 11:57:33.366 16065 16065 V pythonutil: Loading library: sqlite3
04-30 11:57:33.372 16065 16065 V pythonutil: Loading library: ffi
04-30 11:57:33.373 16065 16065 V pythonutil: Loading library: SDL2
04-30 11:57:33.378 16065 16065 V pythonutil: Loading library: SDL2_image
04-30 11:57:33.380 16065 16065 V pythonutil: Loading library: SDL2_mixer
04-30 11:57:33.383 16065 16065 V pythonutil: Loading library: SDL2_ttf
04-30 11:57:33.386 16065 16065 V pythonutil: Loading library: ssl1.1
04-30 11:57:33.389 16065 16065 V pythonutil: Loading library: crypto1.1
04-30 11:57:33.390 16065 16065 V pythonutil: Loading library: python2.7
04-30 11:57:33.394 16065 16065 V pythonutil: Library loading error: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/demo.org.rextesterdroid-YrjVyt4GtoR4HsmJb479yw==/base.apk"],nativeLibraryDirectories=[/data/app/demo.org.rextesterdroid-YrjVyt4GtoR4HsmJb479yw==/lib/arm, /data/app/demo.org.rextesterdroid-YrjVyt4GtoR4HsmJb479yw==/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]] couldn't find "libpython2.7.so"
04-30 11:57:33.394 16065 16065 V pythonutil: Loading library: python3.5m
04-30 11:57:33.395 16065 16065 V pythonutil: Library loading error: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/demo.org.rextesterdroid-YrjVyt4GtoR4HsmJb479yw==/base.apk"],nativeLibraryDirectories=[/data/app/demo.org.rextesterdroid-YrjVyt4GtoR4HsmJb479yw==/lib/arm, /data/app/demo.org.rextesterdroid-YrjVyt4GtoR4HsmJb479yw==/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]] couldn't find "libpython3.5m.so"
04-30 11:57:33.395 16065 16065 V pythonutil: Loading library: python3.6m
04-30 11:57:33.396 16065 16065 V pythonutil: Library loading error: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/demo.org.rextesterdroid-YrjVyt4GtoR4HsmJb479yw==/base.apk"],nativeLibraryDirectories=[/data/app/demo.org.rextesterdroid-YrjVyt4GtoR4HsmJb479yw==/lib/arm, /data/app/demo.org.rextesterdroid-YrjVyt4GtoR4HsmJb479yw==/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]] couldn't find "libpython3.6m.so"
04-30 11:57:33.396 16065 16065 V pythonutil: Loading library: python3.7m
04-30 11:57:33.403 16065 16065 V pythonutil: Loading library: main
04-30 11:57:33.405 16065 16065 V pythonutil: Failed to load _io.so or unicodedata.so...but that's okay.
04-30 11:57:33.405 16065 16065 V pythonutil: Unsatisfied linker when loading ctypes
04-30 11:57:33.405 16065 16065 V pythonutil: Loaded everything!
04-30 11:57:33.540 16065 16086 I python  : Initializing Python for Android
04-30 11:57:33.540 16065 16086 I python  : Setting additional env vars from p4a_env_vars.txt
04-30 11:57:33.540 16065 16086 I python  : Changing directory to the one provided by ANDROID_ARGUMENT
04-30 11:57:33.540 16065 16086 I python  : /data/user/0/demo.org.rextesterdroid/files/app
04-30 11:57:33.541 16065 16086 I python  : Preparing to initialize python
04-30 11:57:33.542 16065 16086 I python  : _python_bundle dir exists
04-30 11:57:33.542 16065 16086 I python  : calculated paths to be...
04-30 11:57:33.542 16065 16086 I python  : /data/user/0/demo.org.rextesterdroid/files/app/_python_bundle/stdlib.zip:/data/user/0/demo.org.rextesterdroid/files/app/_python_bundle/modules
04-30 11:57:33.544 16065 16086 I python  : set wchar paths...
04-30 11:57:33.607 16065 16086 I python  : Initialized python
04-30 11:57:33.607 16065 16086 I python  : AND: Init threads
04-30 11:57:33.609 16065 16086 I python  : testing python print redirection
04-30 11:57:33.610 16065 16086 I python  : Android path ['.', '/data/user/0/demo.org.rextesterdroid/files/app/_python_bundle/stdlib.zip', '/data/user/0/demo.org.rextesterdroid/files/app/_python_bundle/modules', '/data/user/0/demo.org.rextesterdroid/files/app/_python_bundle/site-packages']
04-30 11:57:33.611 16065 16086 I python  : os.environ is environ({'PATH': '/sbin:/system/sbin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin', 'DOWNLOAD_CACHE': '/data/cache', 'ANDROID_BOOTLOGO': '1', 'ANDROID_ROOT': '/system', 'ANDROID_ASSETS': '/system/app', 'ANDROID_DATA': '/data', 'ANDROID_STORAGE': '/storage', 'EXTERNAL_STORAGE': '/sdcard', 'ASEC_MOUNTPOINT': '/mnt/asec', 'BOOTCLASSPATH': '/system/framework/core-oj.jar:/system/framework/core-libart.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/bouncycastle.jar:/system/framework/apache-xml.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/android.hidl.base-V1.0-java.jar:/system/framework/android.hidl.manager-V1.0-java.jar:/system/framework/framework-oahl-backward-compatibility.jar:/system/framework/android.test.base.jar:/system/framework/org.ifaa.android.manager.jar:/system/framework/telephony-ext.jar', 'SYSTEMSERVERCLASSPATH': '/system/framework/services.jar:/system/framework/ethernet-service.jar:/system/framework/wifi-service.jar:/system/framework/com.android.location.provider.jar', 'ANDROID_CACHE': '/cache', 'TERMINFO': '/system/etc/terminfo', 'ANDROID_SOCKET_zygote_secondary': '12', 'ANDROID_ENTRYPOINT': 'main.pyc', 'ANDROID_ARGUMENT': '/data/user/0/demo.org.rextesterdroid/files/app', 'ANDROID_APP_PATH': '/data/user/0/demo.org.rextesterdroid/files/app', 'ANDROID_PRIVATE': '/data/user/0/demo.org.rextesterdroid/files', 'ANDROID_UNPACK': '/data/user/0/demo.org.rextesterdroid/files/app', 'PYTHONHOME': '/data/user/0/demo.org.rextesterdroid/files/app', 'PYTHONPATH': '/data/user/0/demo.org.rextesterdroid/files/app:/data/user/0/demo.org.rextesterdroid/files/app/lib', 'PYTHONOPTIMIZE': '2', 'P4A_BOOTSTRAP': 'SDL2', 'PYTHON_NAME': 'python', 'P4A_IS_WINDOWED': 'False', 'P4A_ORIENTATION': 'portrait', 'P4A_NUMERIC_VERSION': 'None', 'P4A_MINSDK': '21', 'LC_CTYPE': 'C.UTF-8'})
04-30 11:57:33.611 16065 16086 I python  : Android kivy bootstrap done. __name__ is __main__
04-30 11:57:33.611 16065 16086 I python  : AND: Ran string
04-30 11:57:33.611 16065 16086 I python  : Run user program, change dir and execute entrypoint
04-30 11:57:34.108 16065 16086 I python  : [INFO   ] [Logger      ] Record log in /data/user/0/demo.org.rextesterdroid/files/app/.kivy/logs/kivy_19-04-30_3.txt
04-30 11:57:34.108 16065 16086 I python  : [INFO   ] [Kivy        ] v1.11.0.dev0, git-26fa79c, 20190430
04-30 11:57:34.109 16065 16086 I python  : [INFO   ] [Python      ] v3.7.1 (default, Apr 29 2019, 22:49:16) 
04-30 11:57:34.109 16065 16086 I python  : [Clang 6.0.2 (https://android.googlesource.com/toolchain/clang 183abd29fc496f55
04-30 11:57:34.115 16065 16086 I python  :  Traceback (most recent call last):
04-30 11:57:34.115 16065 16086 I python  :    File "/home/alexandrumarcel/projects/kivy-apps/rextester/.buildozer/android/app/main.py", line 5, in <module>
04-30 11:57:34.115 16065 16086 I python  :    File "/home/alexandrumarcel/projects/kivy-apps/rextester/.buildozer/android/platform/build/build/python-installs/rextesterdroid/kivy/app.py", line 319, in <module>
04-30 11:57:34.116 16065 16086 I python  :    File "/home/alexandrumarcel/projects/kivy-apps/rextester/.buildozer/android/platform/build/build/python-installs/rextesterdroid/kivy/base.py", line 26, in <module>
04-30 11:57:34.117 16065 16086 I python  :    File "/home/alexandrumarcel/projects/kivy-apps/rextester/.buildozer/android/platform/build/build/python-installs/rextesterdroid/kivy/clock.py", line 362, in <module>
04-30 11:57:34.117 16065 16086 I python  :  ImportError: dlopen failed: "/data/data/demo.org.rextesterdroid/files/app/_python_bundle/site-packages/kivy/_clock.so" is 64-bit instead of 32-bit
04-30 11:57:34.117 16065 16086 I python  : Python for android ended.


Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

6reactions
windowsansiblernewcommented, May 21, 2019

where did you give kivy==master this? in buildozer.spec? i also have the same issue, please help

1reaction
nitanmarcelcommented, May 2, 2019

Can you do that again, re-run buildozer, and post the full build log?

After a lot of fights with switching between different versions of p4a and kivy I managed to build using kivy==master . I still have no idea what caused that weird bug and why it’s working right now. I will leave this issue open if you need it for future reference.

Read more comments on GitHub >

github_iconTop Results From Across the Web

dlopen failed: _imaging.so is 64-bit · Issue #1131 · kivy/python ...
App crashing on startup- ImportError: dlopen failed: _imaging.so is ... sqlite3,kivy requirements = kivy,hostpython2,plyer,android,pil ...
Read more >
0 - Stack Overflow
ImportError : dlopen failed: "/data/data/. ... I am trying to build android apk for my existing python Kivy desktop application which ...
Read more >
my android app made in kivy crashes on being opened in ...
my android app made in kivy crashes on being opened in android, displays opencv error ... ImportError:dlopen failed: "(long path ...
Read more >
buildozer 0.36 - PyPI
Problem with Android API 23 [\#573](https://github.com/kivy/buildozer/issues/573) - App crashing on startup- ImportError: dlopen failed: \_imaging.so is ...
Read more >
import error dlopen - You.com | The Search Engine You Control
kivy /python-for-androidApp crashing on startup - Import Error: dlopen failed: _portaudio.so is 64 bit instead of 32 bit#1953. Created over 3 years ago....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found