Installed with pip3:
I was following this RealPython tutorial and after doing:
$ buildozer -v android debug
PyCharm show this on the terminal complaining about some xml schema issue:
# Run '/home/madtyn/.buildozer/android/platform/android-sdk/tools/bin/sdkmanager tools platform-tools'
# Cwd /home/madtyn/.buildozer/android/platform/android-sdk
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 5 more
# Command failed: /home/madtyn/.buildozer/android/platform/android-sdk/tools/bin/sdkmanager tools platform-tools
#
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2
I should say that I tried uninstalling JDK 1.11, JDK 1.8 and JDK 13 (Zulu).
Given that I tried several things and succeeded in the end but I don't know which step exactly did the trick, I'm describing everything I did step by step.
In the folder created for packaging with buildozer, I deleted this folder
$ rm -rf .buildozer/
Uninstalled my JDK, which was zulu JDK13
As advised by somebody, I installed some dependencies. Notice there is a JDK here:
$ sudo apt install -y git zip unzip openjdk-8-jdk python3-pip autoconf libtool pkg-config zlib1g-dev libncurses5-dev libncursesw5-dev libtinfo5 cmake
At this moment, I tried again:
$ buildozer -v android debug
I got a different error. Here you can see a pair of screenshots:
Updated/installed the most modern cython and kivy:
$ pip3 install -U cython==0.29.6
# I think pip3 install --upgrade cython would have been just fine
$ pip3 install --upgrade kivy
I installed another dependency, which may or may not be necessary:
$ sudo apt install aidl
I finally launched the successful last command, which took about 20 minutes long:
$ buildozer -v android debug
This created the apk. It seems like cython and kivy versions have compatibility versions in some cases so you should really pay attention to that. Having the latest ones can't do any harm.