I have a problem when trying to create an apk from my .py file created with the kivy framework, the error and the commands I use are the following
wonder@wonder-M720SR:~/Kivy-Calculator$ buildozer android debug
deploy run
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
# Install platform
# Apache ANT found at /home/wonder/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /home/wonder/.buildozer/android/platform/android-sdk-20
# Android NDK found at /home/wonder/.buildozer/android/platform/android-ndk-r9c
# Check application requirements
# Check garden requirements
# Compile platform
# Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir=/home/wonder/Kivy-Calculator/.buildozer/android/platform/build
#
# Buildozer failed to execute the last command
# If the error is not obvious, please raise the log_level to 2
# and retry the latest command.
# In case of a bug report, please add a full log with log_level = 2
executing the command that generated the problem I receive this result:
wonder@wonder-M720SR:~/Kivy-Calculator$ /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir=/home/wonder/Kivy-Calculator/.buildozer/android/platform/build
[INFO]: Will compile for the following archs: armeabi-v7a
[INFO]: Found possible SDK dirs in buildozer dir: android-sdk-20
[INFO]: Will attempt to use SDK at /home/wonder/.buildozer/android/platform/android-sdk-20
[WARNING]: This SDK lookup is intended for debug only, if you use python-for-android much you should probably maintain your own SDK download.
[INFO]: Android API target was not set manually, using the default of 15
[INFO]: Available Android APIs are (19)
[WARNING]: Requested API target 15 is not available, install it with the SDK android tool.
[WARNING]: Exiting.
Thanks in advance
In this case it is important to install the SDK that is indicated as target , this so that it generates the .apk, if you do not define a target, API 15 is configured by default
But API 15 is not installed, it is necessary to install it or, as another option, define 19 as target, which is the one you currently have installed.
Edit your file
buildozer.spec
and add the version of the SDK to use (it must be installed), for example if it is 19: