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

Can't get off the ground #485

Closed
benson-basis opened this issue Nov 4, 2015 · 6 comments
Closed

Can't get off the ground #485

benson-basis opened this issue Nov 4, 2015 · 6 comments

Comments

@benson-basis
Copy link

I'm trying to fix the APK build of pyjinus, but I'm failing to get p-for-a to work at all, following the instructions on http://python-for-android.readthedocs.org/en/latest/quickstart/#installation. Note in particular that setting the NDK version as documented is not effective.

@dessant? Help?

➜  pyjnius git:(python3) export ANDROIDNDKVER=r14
➜  pyjnius git:(python3) python-for-android apk help
[INFO]:    This python-for-android revamp is an experimental alpha release!
[INFO]:    It should work (mostly), but you may experience missing features or bugs.
[INFO]:    Android API target was not set manually, using the default of 15
[INFO]:    Available Android APIs are ()
[WARNING]: Requested API target 15 is not available, install it with the SDK android tool.
[WARNING]: Exiting.
➜  pyjnius git:(python3) 
@inclement
Copy link
Member

The error is suggesting that your SDK doesn't have any platform tools installed (you need these for a specific android version) - by default it tries to target version 15.

You can check this by running the 'android' command from the SDK, which will give a gui from which you can install some tools.

If you think you have some platform tools installed, maybe p4a is detecting it wrong and I'll reopen.

@peppeska
Copy link

peppeska commented Nov 9, 2015

Hi,
I installed "Android SDK Platform-tools" (23.0.1) from the tool Android, but I still have the same error.

@inclement
Copy link
Member

You need the 'SDK Platform' from a specific api number.

@freemant2000
Copy link

Note that an Android SDK can target multiple API versions, so it is talking about a missing API version instead of an SDK version. I fixed the problem by:

  1. run ~/.buildozer/android/platform/android-sdk-20/tools/android
  2. check the API version installed. let's say it is "api 19".
  3. edit buildozer.spec:
    android.api = 19

AndreMiras added a commit to AndreMiras/python-for-android that referenced this issue Nov 10, 2017
Requested API target 19 is not available, refs kivy#485
@drjoms
Copy link

drjoms commented Dec 20, 2018

OK I managed to change buildozer.spec file.

Problem seemed to go away, but now I get this:

# Apache ANT found at /home/dimko/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /home/dimko/.buildozer/android/platform/android-sdk-24.3.3
# Android NDK found at /home/dimko/.buildozer/android/platform/android-ndk-r18b
# Check application requirements
# Check garden requirements
# Compile platform
# Command failed: /usr/bin/python3.6 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/dimko/BashScripts/python/new/.buildozer/android/platform/build"

i have run ~/.buildozer/android/platform/android-sdk-20/tools/android

I made sure everything I could install from API15 is installed.(one package cant be installed. google intel api)

i changed those lines in spec file:

# (int) Android API to use                                                                                                                                                                                         
android.api = 19
# (int) Minimum API required                                                                                                                                                                                       
android.minapi = 19

# (int) Android SDK version to use                                                                                                                                                                                 
android.sdk = 24.3.3

# (str) Android NDK version to use                                                                                                                                                                                 
android.ndk = 18b

i am still getting error above. Another bug?(shouldnt it complain about api19, which i also installed?)

@davied9
Copy link

davied9 commented Jun 19, 2019

I've encounter the same problem,

[INFO]:    Will compile for the following archs: armeabi-v7a
[INFO]:    Found Android API target in $ANDROIDAPI
[INFO]:    Available Android APIs are (23, 27)
[WARNING]: Requested API target 29 is not available, install it with the SDK android tool.
[WARNING]: Exiting.
# Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=SimpleApp --bootstrap=sdl2 --requirements=python3crystax,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/kivy/Desktop/Projects/TestBuildozer/build_area/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

I'm using new android sdk package, sdkmanager is suggested to be used,
I run

./sdkmanager "platforms;android-27"

solve this problem, here 27 specified my required version of Android SDK

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

6 participants