Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Help Needed: Kivy App Crashing on Android After Buildozer APK Creation

110 views
Skip to first unread message

sidi med

unread,
Nov 2, 2024, 6:14:38 PM11/2/24
to Kivy users support

Hi everyone,

I'm new to Kivy and Buildozer. I'm hoping for some help with an issue I'm having. For anyone who has used Buildozer to port their Python/Kivy app to Android: have you ever encountered this problem? When I run the command buildozer android debug, the APK is created successfully. But after I install it on my phone, the app starts to load, then crashes before it reaches the home screen.

In my terminal, I see a specific message that didn’t affect the APK generation process, but I’m wondering if it could be causing the crash. I’d be really grateful for any help—I’m stuck and can’t find a solution anywhere.

Thank you!


   STDOUT: warning: [options] bootstrap class path not set in conjunction with -source 8 1 warning running build_ext building 'jnius' extension creating build creating build/temp.linux-x86_64-3.11 creating build/temp.linux-x86_64-3.11/jnius /home/sc262585/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -I/home/sc262585/MyApplication/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include -DANDROID -I/home/sc262585/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -I/home/sc262585/MyApplication/.buildozer/android/platform/build-arm64-v8a/build/python-installs/myapp/arm64-v8a/include/python3.1 -fPIC -I/home/sc262585/MyApplication/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Include -I/home/sc262585/MyApplication/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build -c jnius/jnius.c -o build/temp.linux-x86_64-3.11/jnius/jnius.o clang-14: error: no such file or directory: 'jnius/jnius.c' clang-14: error: no input files error: command

'/home/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang' failed with exit code 1 STDERR: [INFO]: pyjnius first build failed (as expected) [INFO]: Running cython where appropriate [INFO]: Cythonize jnius/jnius.pyx [DEBUG]: -> running python3 -cimport sys; from Cython.Compiler.Main import setuptools_main; sys.exit(setuptools_main()); ./jnius/jnius.pyx [DEBUG]:    

sidi med

unread,
Nov 2, 2024, 6:14:41 PM11/2/24
to Kivy users support

Hi everyone,

I'm new to Kivy and Buildozer. I'm hoping for some help with an issue I'm having. For anyone who has used Buildozer to port their Python/Kivy app to Android: have you ever encountered this problem? When I run the command buildozer android debug, the APK is created successfully. But after I install it on my phone, the app starts to load, then crashes before it reaches the home screen.

In my terminal, I see a specific message that didn’t affect the APK generation process, but I’m wondering if it could be causing the crash. I’d be really grateful for any help—I’m stuck and can’t find a solution anywhere.

Thank you!

*******************************************

I use : Kivy==2.3.0, Cython==3.0.11

*******************************************

and my file : buildozer.spec

**************************************************************************************

[app]
title = MyApp
package.name = myapp
package.domain = org.test
source.dir = .
source.include_exts = py,png,jpg,kv,atlas
version = 0.1
#android.requirements = openssl
requirements = python3==3.10.12, kivy==2.3.0, pillow==10.4.0

icon.filename = %(source.dir)s/Logoapp.png
orientation = portrait

# OSX Specific
osx.python_version = 3.10.12
osx.kivy_version = 2.3.0

# Android specific
fullscreen = 0
android.permissions = INTERNET, WRITE_EXTERNAL_STORAGE, READ_EXTERNAL_STORAGE
android.archs = arm64-v8a
android.api = 33

**************************************************************************************


    STDOUT: warning: [options] bootstrap class path not set in conjunction with -source 8 1 warning running build_ext building 'jnius' extension creating build creating build/temp.linux-x86_64-3.11 creating build/temp.linux-x86_64-3.11/jnius /home/sc262585/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -I/home/sc262585/MyApplication/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include -DANDROID -I/home/sc262585/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -I/home/sc262585/MyApplication/.buildozer/android/platform/build-arm64-v8a/build/python-installs/myapp/arm64-v8a/include/python3.1 -fPIC -I/home/sc262585/MyApplication/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Include -I/home/sc262585/MyApplication/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build -c jnius/jnius.c -o build/temp.linux-x86_64-3.11/jnius/jnius.o clang-14: error: no such file or directory: 'jnius/jnius.c' clang-14: error: no input files error: command

 '/home/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang' failed with exit code 1'/home/sc262585/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang' failed with exit code 1

Ajay kumar Sahu

unread,
Nov 2, 2024, 9:34:53 PM11/2/24
to Kivy users support

Omar Tarek

unread,
Nov 3, 2024, 8:58:55 AM11/3/24
to kivy-...@googlegroups.com
I had the exact same problem and struggled with it for a long time
First, you need to get the app logs so you can find the error and then fix it

Easiest way: upload your app here, and start it in debug mode as shown in the picture.
This will allow you to view the logs and discover exactly what went wrong during startup.

I am not that experienced in kivy and specially android related problems but this is how i fixed my app and got it working on mobile, good luck

2024-11-03_122929.png

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/kivy-users/77df66fc-b3f3-496d-a571-db7dca311c76n%40googlegroups.com.

Ajay kumar Sahu

unread,
Nov 3, 2024, 9:02:48 AM11/3/24
to Kivy users support
No need to worry , u can use AnvPy it will build ur code within 5 seconds without any error

sidi med

unread,
Nov 3, 2024, 5:34:18 PM11/3/24
to Kivy users support

Thank you very much for your help—it's incredibly useful. I'll test it out and keep you updated!

sidi med

unread,
Nov 3, 2024, 5:38:58 PM11/3/24
to Kivy users support

This is a very useful application, and I want to commend you on the excellent work you've done. I’ve had a chance to test it, but unfortunately, it hasn’t worked as expected so far. I also noticed that the log messages remain the same regardless of which source file is being compiled. Maybe I didn't use it the right way.

Ajay kumar Sahu

unread,
Nov 3, 2024, 7:27:39 PM11/3/24
to Kivy users support
Did u watch complete video plz join telegram group I can help u there

Zahir khan attari

unread,
Apr 24, 2025, 12:39:35 PMApr 24
to Kivy users support
Don't add kivy and pillow version. Remember mention all the libraries that you used in your project.
Reply all
Reply to author
Forward
0 new messages