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

Android NDK - "$NDK/platforms/android-25" missing? #1992

Closed
podraco opened this issue Sep 28, 2019 · 6 comments
Closed

Android NDK - "$NDK/platforms/android-25" missing? #1992

podraco opened this issue Sep 28, 2019 · 6 comments

Comments

@podraco
Copy link

podraco commented Sep 28, 2019

Versions

  • Python: 3.7
  • OS: Ubuntu 19.04
  • Kivy: 1.11.1
  • Cython: 0.29.13

Description

Español:

Según la información proporcionada por el foro de android NDK No hay una nueva versión nativa del NDK(version 15+)/platforms/android-25, por lo cual se debe compilar con el NDK/platforms/android-24.
Android Studio reconoce este "error" y trabaja automáticamente con NDK/platforms/android-24
mientras que p4a no...
(Existe un bug en android NDK 15c en el cual no trata la carpeta faltante android-25 y se debe usar manualmente android-24)

English:

The information provided from the forum from android NDK say that there's there were no new native APIs in NDK(version 15+)/platforms/android-25, because of that it should be compiled with NDK/platforms/android-24.
Android Studio knows about this "Error" and it works automatically with NDK/platforms/android-24 while p4a still dont.
(there is a bug in NDK r15+: it does not treat correctly the missing android-25 folder. and it has to be used android-24 manually)

Sources:

buildozer.spec

Command:

AppDir$ buildozer -v android debug

Spec file:

requirements = sdl2, python3, sqlite3, kivy==master, kivymd, hostpython3, pillow, libffi
# (int) Target Android API, should be as high as possible.
android.api = 29

# (int) Minimum API your APK will support.
#android.minapi = 26 # Works
#android.minapi = 24 # Works
android.minapi = 25 < --- Error

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

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

android.ndk = 19b
#android.ndk = 20

log_level = 2

Logs

--------------------------------------------------------------------------------------------------------------------------------
[INFO]:    Recipe kivy: version "master" requested
[WARNING]: $ANDROIDNDKVER is deprecated and no longer necessary, the value you set is ignored
[INFO]:    Will compile for the following archs: armeabi-v7a
[INFO]:    Found Android API target in $ANDROIDAPI: 29
[INFO]:    Available Android APIs are (29)
[INFO]:    Requested API target 29 is available, continuing.
[INFO]:    Found NDK dir in $ANDROIDNDK: $HOME/.buildozer/android/platform/android-ndk-r19b
[INFO]:    Found NDK version 19b
[INFO]:    Getting NDK API version (i.e. minimum supported API) from user argument
[INFO]:    Found virtualenv at /usr/local/bin/virtualenv
[WARNING]: ndk_platform doesn't exist: $HOME/.buildozer/android/platform/android-ndk-r19b/platforms/android-25/arch-arm <<< This is the error
[INFO]:    Found the following toolchain versions: ['4.9']
[INFO]:    Picking the latest gcc toolchain, here 4.9
[ERROR]:   Build failed: python-for-android cannot continue due to the missing executables above
--------------------------------------------------------------------------------------------------------------------------------

By the information of the sources it might be useful to link the missing NDK api levels to the next lower one found in the NDK/platforms folder

@AndreMiras
Copy link
Member

It's not too clear to me what the error is, but if you want to use android.ndk = 19b then you also need p4a.branch = develop currently

@podraco
Copy link
Author

podraco commented Sep 28, 2019

It's not too clear to me what the error is, but if you want to use android.ndk = 19b then you also need p4a.branch = develop currently

i'm actually using that...

When the minimal API is set in 25, the project won't compile because android NDK will not find the folder "$NDK/platforms/android-25" (because it doesn't exists.)

That means that p4a needs to use API level to 24 when android.minapi = 25

@bevinhex
Copy link

with NDK installed by android studio, "platforms" folder is missing

@OrangeDog
Copy link

The latest NDK no longer has a "platforms" folder at all: #2391

@bevinhex
Copy link

If anyone got problem with build tools, due to 'platforms' folder, unless you really need the latest version, downgrade your NDK as a workaround, it is working for me.

@misl6
Copy link
Member

misl6 commented Jul 14, 2022

Fixed via #2586, feel free to re-open the issue if you're still encountering it on the develop branch.

@misl6 misl6 closed this as completed Jul 14, 2022
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
@AndreMiras @OrangeDog @podraco @misl6 @bevinhex and others