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

No valid --ndk-api received, using the default of 0 = min(android-api=0, default ndk-api=21) #772

Closed
bunmalik opened this issue Dec 25, 2018 · 8 comments

Comments

@bunmalik
Copy link

bunmalik commented Dec 25, 2018

I read this was reported as a bug in the older version and there has been a fix here (kivy/python-for-android#1381 (comment)). But it seems like the bug still persists. Please come to my aid, perhaps there is something wrong I am doing which I might not know.

Versions

  • Python: 2.7
  • OS: Ubuntu 16.04
  • Kivy: 1.10.1
  • Cython: 0.27.3
  • buildozer: 0.37

Description

Buildozer was not able to build apk.

buildozer.spec

Command:
buildozer -v android debug

Spec file:

   # (int) Android API to use
    android.api = 28

   # (int) Minimum API required
    android.minapi = 21

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

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

    # (bool) Use --private data storage (True) or --dir public storage (False)
    #android.private_storage = True

    # (str) Android NDK directory (if empty, it will be automatically downloaded.)
    android.ndk_path = ~/.buildozer/android/platform/android-ndk-r18b 

Logs

    # Apache ANT found at /home/bunmalik/.buildozer/android/platform/apache-ant-1.9.4
    # Android SDK found at /home/bunmalik/.buildozer/android/platform/android-sdk-24
    # Android NDK found at /home/bunmalik/.buildozer/android/platform/android-ndk-r18b
    # Check application requirements
    # Check garden requirements
    # Compile platform
    # Run '/usr/bin/python -m pythonforandroid.toolchain create --dist_name=AnasCalc --bootstrap=sdl2 --requirements=python2,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/bunmalik/Desktop/thesis/codes/codes/calculator/calc/AnasCalc/AnasCalc2/.buildozer/android/platform/build"'
    # Cwd 
/home/bunmalik/Desktop/thesis/codes/codes/calculator/calc/AnasCalc/AnasCalc2/.buildozer/android/platform/python-for-android-new-toolchain
    [WARNING]: No valid --ndk-api received, using the default of 0 = min(android-api=0, default ndk-api=21)
    [INFO]:    Will compile for the following archs: armeabi-v7a
    [INFO]:    Found Android API target in $ANDROIDAPI: 28
    [INFO]:    Available Android APIs are (21, 22, 23, 24, 25, 26, 27, 28)
    [INFO]:    Requested API target 28 is available, continuing.
    [INFO]:    Found NDK dir in $ANDROIDNDK: /home/bunmalik/.buildozer/android/platform/android-ndk-r18b
     [INFO]:    Got NDK version from $ANDROIDNDKVER: r18b
     [INFO]:    Using Google NDK r18b
     [INFO]:    Found virtualenv at /usr/local/bin/virtualenv
     [WARNING]: ndk_platform doesn't exist: /home/bunmalik/.buildozer/android/platform/android-ndk-r18b/platforms/android-0/arch-arm
     [INFO]:    Found the following toolchain versions: ['4.9']
     [INFO]:    Picking the latest gcc toolchain, here 4.9
     [ERROR]:   python-for-android cannot continue; aborting
     # Command failed: /usr/bin/python -m pythonforandroid.toolchain create --dist_name=AnasCalc --bootstrap=sdl2 --requirements=python2,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/bunmalik/Desktop/thesis/codes/codes/calculator/calc/AnasCalc/AnasCalc2/.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

@bunmalik
Copy link
Author

Please no one is here to reply

@KeyWeeUsr
Copy link
Contributor

@bunmalik It's a holiday time, afaik a lot of people are generally "away". Please come to https://chat.kivy.org to make sure someone notices your issue or better said someone who already solved it can help you.

Personally, I've had no such problem, but I use master branch of python-for-android. Please try to upgrade p4a to the development version (master) and give it another try. :)

@SomberNight
Copy link
Contributor

Maybe try setting android.ndk_api

#android.ndk_api = 19

@bunmalik
Copy link
Author

bunmalik commented Dec 28, 2018

@SomberNight, I did as u said, it only sent away the [WARNING]: No valid --ndk-api received, using the default of 0 = min(android-api=0, default ndk-api=21) and repeated the same error in my Logs...

@KeyWeeUsr, thanks for the link but the python-for-android suggestion did not work.I set p4a.branch = master in my .spec file ...please I need help to resolve dis issue. I have searched the internet severally and this has kept me stacked almost a month now....

@bunmalik
Copy link
Author

bunmalik commented Jan 4, 2019

No one here to address this issue

@tito tito closed this as completed in 6b004f9 Jan 7, 2019
@Tony001stark
Copy link

I have same issue please help us

@OptimusGREEN
Copy link
Contributor

I think 17c is the highest supported ndk. have you tried that with kivy and p4a master?

@erm3nda
Copy link

erm3nda commented May 6, 2020

This is a problem qhe struggles me everytime, and time to time while things get updated over the time. But I solve it in the same way always.

Sometimes, the sdk gets updated and your old settings doesn't work anymore, sometimes only certain versions of sdk/ndk works togheter.

Remove/comment all your ndk/sdk paths and use the android.sdk/ndk settings to re-download them by buildozer untill someone works.

Despite the comments about recommended versions in the logs. For me, the android.minapi = 21 is the only one that works out of the box. The same settings with 19 will fail with logs like "check wheter the gcc compiler works = no" that lends you to think that you need to install any gcc.

The gcc (the toolchain for arm) is on the ndk, and if it fails means that you're using the wrong set of choice for sdk/ndk.

Just keep triying versions untill it works. If you had specified many settings, less is more, start with just android.minapi and tune settings to your needs one by one.

Regards.

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