'Kivy App compiled with Buildozer crashes on startup (no traceback)
I have been trying to compile an application developed in Python and Kivy with Buildozer for a couple hours now. I can get an app to deploy onto my android, however it will always crash on startup. Normally I would just find the issue in the logs (usually a missing dependancy in spec file), however this time the logs seem to show nothing. I will provide them just in case I missed something. The only thing I think could maybe be an issue is the older configuration warning, but I'm not sure exactly how to fix that.
03-19 00:43:27.708 27973 28277 I python : Initializing Python for Android
03-19 00:43:27.708 27973 28277 I python : Setting additional env vars from p4a_env_vars.txt
03-19 00:43:27.708 27973 28277 I python : Changing directory to the one provided by ANDROID_ARGUMENT
03-19 00:43:27.708 27973 28277 I python : /data/user/0/org.main.v4.uhs.signoff/files/app
03-19 00:43:27.708 27973 28277 I python : Preparing to initialize python
03-19 00:43:27.708 27973 28277 I python : _python_bundle dir exists
03-19 00:43:27.708 27973 28277 I python : calculated paths to be...
03-19 00:43:27.708 27973 28277 I python : /data/user/0/org.main.v4.uhs.signoff/files/app/_python_bundle/stdlib.zip:/data/user/0/org.main.v4.uhs.signoff/files/app/_python_bundle/modules
03-19 00:43:27.708 27973 28277 I python : set wchar paths...
03-19 00:43:27.737 27973 28277 I python : Initialized python
03-19 00:43:27.738 27973 28277 I python : AND: Init threads
03-19 00:43:27.738 27973 28277 I python : testing python print redirection
03-19 00:43:27.738 27973 28277 I python : Android path ['.', '/data/user/0/org.main.v4.uhs.signoff/files/app/_python_bundle/stdlib.zip', '/data/user/0/org.main.v4.uhs.signoff/files/app/_python_bundle/modules', '/data/user/0/org.main.v4.uhs.signoff/files/app/_python_bundle/site-packages']
03-19 00:43:27.738 27973 28277 I python : os.environ is environ({'PATH': '/product/bin:/apex/com.android.runtime/bin:/apex/com.android.art/bin:/system_ext/bin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin', 'ANDROID_BOOTLOGO': '1', 'ANDROID_ROOT': '/system', 'ANDROID_ASSETS': '/system/app', 'ANDROID_DATA': '/data', 'ANDROID_STORAGE': '/storage', 'ANDROID_ART_ROOT': '/apex/com.android.art', 'ANDROID_I18N_ROOT': '/apex/com.android.i18n', 'ANDROID_TZDATA_ROOT': '/apex/com.android.tzdata', 'EXTERNAL_STORAGE': '/sdcard', 'ASEC_MOUNTPOINT': '/mnt/asec', 'DOWNLOAD_CACHE': '/data/cache', 'BOOTCLASSPATH': '/apex/com.android.art/javalib/core-oj.jar:/apex/com.android.art/javalib/core-libart.jar:/apex/com.android.art/javalib/okhttp.jar:/apex/com.android.art/javalib/bouncycastle.jar:/apex/com.android.art/javalib/apache-xml.jar:/system/framework/framework.jar:/system/framework/framework-graphics.jar:/system/framework/ext.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/knoxsdk.jar:/system/framework/knoxanalyticssdk.jar:/system/framework/drutils.jar:/system/framework/uibc_java.jar:/system/framework/SmpsManager.jar:/system/framework/esecomm.jar:/system/framework/tcmiface.jar:/system/framework/telephony-ext.jar:/system/framework/QPerformance.jar:/system/framework/UxPerformance.jar:/system/framework/sem-telephony-common.jar:/apex/com.android.i18n/javalib/core-icu4j.jar:/apex/com.android.appsearch/javalib/framework-appsearch.jar:/apex/com.android.conscrypt/javalib/conscrypt.jar:/apex/com.android.ipsec/javalib/android.net.ipsec.ike.jar:/apex/com.android.media/javalib/updatable-media.jar:/apex/com.android.mediaprovider/javalib/framework-mediaprovider.jar:/apex/com.android.os.statsd/javalib/framework-statsd.jar:/apex/com.android.permission/javalib/framework-permission.jar:/apex/com.android.permission/javalib/framework-permission-s.jar:/apex/com.android.scheduling/javalib/framework-scheduling.jar:/apex/com.android.sdkext/javalib/framework-sdkextensions.jar:/apex/com.android.tethering/javalib/framework-connectivity.jar:/apex/com.android.tethering/javalib/framework-tethering.jar:/apex/com.android.wifi/javalib/framework-wifi.jar:/apex/com.samsung.android.ipm/javalib/framework-samsung-ipm.jar:/apex/com.samsung.android.shell/javalib/framework-samsung-privilege.jar', 'DEX2OATBOOTCLASSPATH': '/apex/com.android.art/javalib/core-oj.jar:/apex/com.android.art/javalib/core-libart.jar:/apex/com.android.art/javalib/okhttp.jar:/apex/com.android.art/javalib/bouncycastle.jar:/apex/com.android.art/javalib/apache-xml.jar:/system/framework/framework.jar:/system/framework/framework-graphics.jar:/system/framework/ext.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/knoxsdk.jar:/system/framework/knoxanalyticssdk.jar:/system/framework/drutils.jar:/system/framework/uibc_java.jar:/system/framework/SmpsManager.jar:/system/framework/esecomm.jar:/system/framework/tcmiface.jar:/system/framework/telephony-ext.jar:/system/framework/QPerformance.jar:/system/framework/UxPerformance.jar:/system/framework/sem-telephony-common.jar:/apex/com.android.i18n/javalib/core-icu4j.jar', 'SYSTEMSERVERCLASSPATH': '/system/framework/com.android.location.provider.jar:/system/framework/services.jar:/system/framework/ethernet-service.jar:/system/framework/ssrm.jar:/system/framework/semwifi-service.jar:/apex/com.android.appsearch/javalib/service-appsearch.jar:/apex/com.android.media/javalib/service-media-s.jar:/apex/com.android.permission/javalib/service-permission.jar:/apex/com.samsung.android.ipm/javalib/service-samsung-ipm.jar:/apex/com.samsung.android.shell/javalib/service-samsung-privilege.jar', 'KNOX_STORAGE': '/data/knox/ext_sdcard', 'ENC_EMULATED_STORAGE_TARGET': '/storage/enc_emulated', 'ANDROID_SOCKET_zygote': '18', 'ANDROID_SOCKET_usap_pool_primary': '22', 'ANDROID_ENTRYPOINT': 'main.pyc', 'ANDROID_ARGUMENT': '/data/user/0/org.main.v4.uhs.signoff/files/app', 'ANDROID_APP_PATH': '/data/user/0/org.main.v4.uhs.signoff/files/
03-19 00:43:27.739 27973 28277 I python : Android kivy bootstrap done. __name__ is __main__
03-19 00:43:27.739 27973 28277 I python : AND: Ran string
03-19 00:43:27.739 27973 28277 I python : Run user program, change dir and execute entrypoint
03-19 00:43:27.806 27973 28277 I python : [WARNING] [Config ] Older configuration version detected (0 instead of 24)
03-19 00:43:27.806 27973 28277 I python : [WARNING] [Config ] Upgrading configuration in progress.
03-19 00:43:27.809 27973 28277 I python : [INFO ] [Logger ] Record log in /data/user/0/org.main.v4.uhs.signoff/files/app/.kivy/logs/kivy_22-03-19_0.txt
03-19 00:43:27.809 27973 28277 I python : [INFO ] [Kivy ] v2.1.0
03-19 00:43:27.809 27973 28277 I python : [INFO ] [Kivy ] Installed at "/data/user/0/org.main.v4.uhs.signoff/files/app/_python_bundle/site-packages/kivy/__init__.pyc"
03-19 00:43:27.809 27973 28277 I python : [INFO ] [Python ] v3.8.9 (default, Mar 19 2022, 00:23:40)
03-19 00:43:27.809 27973 28277 I python : [Clang 8.0.2 (https://android.googlesource.com/toolchain/clang 40173bab62ec7462
03-19 00:43:27.809 27973 28277 I python : [INFO ] [Python ] Interpreter at ""
03-19 00:43:27.810 27973 28277 I python : [INFO ] [Logger ] Purge log fired. Processing...
03-19 00:43:27.810 27973 28277 I python : [INFO ] [Logger ] Purge finished!
03-19 00:43:28.286 27973 28277 I python : [INFO ] [Factory ] 189 symbols loaded
03-19 00:43:28.424 27973 28277 I python : [INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2 (img_pil, img_ffpyplayer ignored)
03-19 00:43:28.439 27973 28277 I python : [INFO ] [Text ] Provider: sdl2
03-19 00:43:28.456 27973 28277 I python : [INFO ] [Window ] Provider: sdl2
03-19 00:43:28.516 27973 28277 I python : [INFO ] [GL ] Using the "OpenGL ES 2" graphics system
03-19 00:43:28.517 27973 28277 I python : [INFO ] [GL ] Backend used <sdl2>
03-19 00:43:28.517 27973 28277 I python : [INFO ] [GL ] OpenGL version <b'OpenGL ES 3.2 [email protected] (GIT@3dad7f8ed7, I593c16c433, 1633080534) (Date:10/01/21)'>
03-19 00:43:28.517 27973 28277 I python : [INFO ] [GL ] OpenGL vendor <b'Qualcomm'>
03-19 00:43:28.517 27973 28277 I python : [INFO ] [GL ] OpenGL renderer <b'Adreno (TM) 640'>
03-19 00:43:28.518 27973 28277 I python : [INFO ] [GL ] OpenGL parsed version: 3, 2
03-19 00:43:28.518 27973 28277 I python : [INFO ] [GL ] Texture max size <16384>
03-19 00:43:28.518 27973 28277 I python : [INFO ] [GL ] Texture max units <16>
03-19 00:43:28.543 27973 28277 I python : [INFO ] [Window ] auto add sdl2 input provider
03-19 00:43:28.544 27973 28277 I python : [INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
03-19 00:43:28.583 27973 28277 I python : Python for android ended.
I am deploying this app to a Samsung Galaxy S10+, and I'm using this adb filter:
*:S Python:D
Am I doing something blatantly wrong? Or is this possibly an issue within the app itself, and how would I go about actually tracing that? Thank you for any help!
Solution 1:[1]
After a day or so of troubleshooting I fixed the issue. I had a file run.py that actually started the app, however buildozer automatically runs main.py, which in my case did nothing but import other files. I just had to move the contents of run.py to main.py and the app worked just fine.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Taylor St Jean |
