buildozer issue - Available Android APIs are ()

1,301 views
Skip to first unread message

Lee Melbourne

unread,
Sep 26, 2019, 1:15:47 AM9/26/19
to Kivy users support
I am trying to compile my first real Kivy project for Android (motion detection using OpenCV). I am running buildozer on Ubuntu to try to create the APK but it seems to be failing for some reason.

Buildozer was previously working fine, so I went back to the HelloWorld app that I first successfully built with buildozer and it is failing at the same point. Therefore I assume this is something to do with changes in the code being pulled down into ~/.buildozer/...etc  (I deleted this folder to test a fix that was applied for some other bug in buildozer). 

The tail of the log is below....it is saying that no Android APIs are found. What does it mean by APIs and where is it looking such that it decides there are no Andoid APIs on my PC any more? 


[INFO]:    Will compile for the following archs: armeabi-v7a
[INFO]:    Found Android API target in $ANDROIDAPI: 27
[INFO]:    Available Android APIs are ()
[ERROR]:   Build failed: Requested API target 27 is not available, install it with the SDK android tool.
# Command failed: /usr/bin/python3.5 -m pythonforandroid.toolchain create --dist_name=helloTest3 --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/lee/KivyProjects/helloTest2/.buildozer/android/platform/build" --ndk-api=21

# 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

Lee Melbourne

unread,
Sep 26, 2019, 6:42:14 AM9/26/19
to Kivy users support
So I have installed Android studio (despite that I didnt need to do this before) and using studio I installed SDK 8.1 (Oreo) which seems to be API level 27. But it doesnt seem to have installed where buildozer is looking, because I still get the damn error.

Anyone got any insight into how this works? Where is buildozer looking such that it decides there are no Andoid APIs on my PC any more? 

Robert Flatt

unread,
Sep 26, 2019, 1:08:24 PM9/26/19
to Kivy users support
Buildozer looks in ~/.buildozer/android/platform
It separately places the NDK, the generic SDK, and the specific SDK versions there.

Try this:

delete: ~/.buildozer
run: buildozer android debug
enter:  y    when asked about the Android SDK license agreement, any other character and the specific SDK version will not be built.

If still have the same error post the FULL log file from the above Buildozer run here as a text file.

Lee Melbourne

unread,
Sep 26, 2019, 6:50:16 PM9/26/19
to Kivy users support
Thanks very much Robert. I deleted both the ~/.buildozer and the one in the application directory. This seemed to fix things. 

Your help is very much appreciated!

Elvis Omondi thuon

unread,
Sep 27, 2019, 1:04:08 AM9/27/19
to kivy-...@googlegroups.com

Thanks for installing android studio:

I did the same ...their is a folder named Android in the home directory to to android/sdk ..copy all this to home/.buildozer/android/platform/android-sdk/....as it ...

this worked for me try it

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/5a052a44-0e1f-4306-99c9-33c73c00c801%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages