Reputation: 102296
I'm testing a script to build a shared object from the command line. According to NDK Downloads, the latest download is android-ndk-r10e
(I thought this was an old download).
However, when I check for android-23
I see there's nothing available:
$ echo "$ANDROID_NDK_ROOT"
/opt/android-ndk-r10e
$ ls "$ANDROID_NDK_ROOT/platforms"
android-12 android-15 android-18 android-3 android-8
android-13 android-16 android-19 android-4 android-9
android-14 android-17 android-21 android-5
Is the NDK for Android 6.0, which I believe is android-23
, not available? Or maybe something else I don't quite understand.
(I'm concerned about the major version bump, and the breaking changes it encompasses, like when the rand function was changed and broke things).
Upvotes: 1
Views: 4021
Reputation: 13317
There are no new native APIs in 6.0, so there is no need to have that target available in the NDK - it would be identical to the ones for 5.1 and 5.0.
When building with the NDK, the target platform is picked as the latest one that actually exists prior to the one you've chosen to target (and the earliest one, for ABIs that were introduced later).
Keep in mind that "target API" behaves quite differently between Java and native code. If you build your native code with one target API level, chances are that the code won't run on older versions at all - see e.g. https://stackoverflow.com/a/27338365/3115956 and https://stackoverflow.com/a/27093163/3115956.
So unless you want to try to manually load and use new functionality on some platforms if available, you should just set the target version (APP_PLATFORM
in jni/Application.mk
) to the lowest version that you want your code to run on, i.e. corresponding to minSdkVersion
.
Upvotes: 1
Reputation: 11537
From my understanding, the NDK is in a separate "stream" of development with releases less or more frequent than the Android platform itself. You should be able to develop a NDK app for android-23 devices without any problem, Google probably just did not have time yet to update the NDK release for android-23.
Looking at the revisions, r10e was released a while ago, but the truth is that it is also the latest version as of today.
Upvotes: 0