Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transient error that a requested API target is not available #771

Closed
brady-ds opened this issue Dec 23, 2018 · 1 comment
Closed

Transient error that a requested API target is not available #771

brady-ds opened this issue Dec 23, 2018 · 1 comment

Comments

@brady-ds
Copy link

brady-ds commented Dec 23, 2018

Versions

  • Python: 3.6.5
  • OS: OpenSUSE 15.0
  • Kivy: 1.10.1
  • Cython: 0.28.3

Description

On a first attempt to build, Buildozer complains that "API target 21 is not available". However, after trying
for API 19, Buildozer seems to be able to pull down that API target itself; the build subsequently works.

buildozer.spec

Commands:

$ sudo pip3 install --upgrade pyjnius pygame kivy buildozer
$ touch main.py
$ buildozer init
$ sed -i -e 's/.*p4a.branch .*/p4a.branch = master/' buildozer.spec
$ sed -i -e 's/.*android.api .*/android.api = 21/' -e 's/.*android.minapi .*/android.minapi = 21/' -e 's/.*android.ndk .*/android.ndk = 17c/' buildozer.spec
$ buildozer -v android debug

(The first sed is because the current p4a stable branch doesn't know the python3 recipe, and the second sed is to work around 770.)

Spec file: just the current default.spec with those two sed commands run on it. (If a full copy is preferred, let me know, and I can paste it.)

Logs

…
[INFO]:    Found Android API target in $ANDROIDAPI: 21
[INFO]:    Available Android APIs are ()
[ERROR]:   Build failed: Requested API target 21 is not available, install it with the SDK android tool.
# Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/cse/project/.buildozer/android/platform/build"
# 
# 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

However, if I go back to the defaults (which fails because of 770):

$ sed -i -e 's/android.api = 21/#android.api = 21/' -e 's/android.ndk = 17c/#android.ndk = 17c/' buildozer.spec
$ sudo sed -i 's|android/repository|android/ndk|' /usr/lib/python3.6/site-packages/buildozer/targets/android.py
$ buildozer -v android debug

and then go back to the non-defaults:

$ sed -i -e 's/.*android.api .*/android.api = 21/' -e 's/.*android.ndk .*/android.ndk = 17c/' buildozer.spec
$ sudo sed -i 's|android/ndk|android/repository|' /usr/lib/python3.6/site-packages/buildozer/targets/android.py
$ buildozer -v android debug

then the build works up until the issue described here.

@Julian-O
Copy link
Contributor

This doesn't seem to be an ongoing issue (temporary network issue? temporary web-server outage? something else fixed in the past 5 years?)

Closing as non-reproducible. If this is wrong, please let us know.

@Julian-O Julian-O closed this as not planned Won't fix, can't repro, duplicate, stale Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants