Hi there,
I have been trying hard the last three days to make an Android Apk from a Kivy app using Buildozer, yet I have not been successful. Kivy application (Mian.py) runs properly in Windows VS Code, and also in WSL2 Ubuntu. Buildozer creates the APK and I install it to my Samsung A32(Android 13) with no errors. The application crashes when I open the application on my phone.
I have attached the log cat of: buildozer android debug deploy run logcat > out.txt and also the Buildozer.spec. I use these libraries in my application (I have commented all the internal libraries per recommendations found in this group):
requirements = python3, kivy, numpy, jnius, kivymd, sqlite3, matplotlib
# struct, wave, random, csv, sqlite3, collections, webbrowser, math, json, six, os, io
My android SDK and NDK values:
# (int) Target Android API, should be as high as possible.
android.api = 33
# (int) Minimum API your APK / AAB will support.
android.minapi = 28
# (int) Android SDK version to use
android.sdk = 33
# (str) Android NDK version to use
android.ndk = 25
# (int) Android NDK API to use. This is the minimum API your app will support, it should usually match android.minapi.
#android.ndk_api = 21
When I use adb to debug deployment of the application, I receive the following error:
Error type 3
Error: Activity class {org.nvhtools.earthquake/org.kivy.android.PythonActivity} does not exist.
Any help is highly appreciated. Thanks.Hi Robert,
Thanks for your help. From the p4a documentation pages you provided what I understand is that the following error happens when at least one library is not properly addressed in buildozer.spec or its recipe is not available am I correct? I have attached the log of adb and buildozer.spec.
Error type 3 Error: Activity class {org.nvhtools.earthquake/org.kivy.android.PythonActivity} does not exist.
I did the appclean and also removed several of my application pages to simplify it but it still gives me the error on my phone (All is OK in Python either in Windows or in WSL Ubuntu log attached). I am using the following libraries in the requirement Should I uncomment any of the libraries from the commented one and add them to the requirements?
requirements = python3, kivy, numpy, jnius, kivymd, sqlite3, matplotlib,ffpyplayer, ffpyplayer_codecs,requests, urllib3, chardet, idna, certifi
# struct, wave, random, csv, sqlite3, collections, webbrowser, math, json, six, os, io, textwrap, uuid, numbers,functools
In the attached log file I see the following prompts, should I worry about them?
[DEBUG]: Unable to strip the following libraries, packaging them as they are: libSDL2.so, libSDL2_image.so, libSDL2_mixer.so, libSDL2_ttf.so, libavcodec.so, libavdevice.so, libavfilter.so, libavformat.so, libavutil.so, libc++_shared.so, libcrypto1.1.so, libffi.so, libfreetype.so, libmain.so, libpng16.so, libpostproc.so, libpybundle.so, libpython3.9.so, libshine.so, libsqlite3.so, libssl1.1.so, libswresample.so, libswscale.so.
[DEBUG]: Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
Thanks in advance.