Lots of API Levels for NDK for Android
Not. You cannot specify such information inside the NDK build system because each version of the Android system image is different.
And for native code, the portability aspect is different than when your application is written only in Java.
You will most likely have to compile your code with a different APP_PLATFORM if you want to support different Android versions with your own code.
As you said, you can use the APP_PLATFORM directive inside the Application.mk file, which is documented as:
APP_PLATFORM = Name the target Android platform. For example, "android-3" corresponds to Android 1.5 system pictures. For a complete list of platform names and corresponding Android system images, read the docs / STABLE -APIS.html.
Parts from docs / STABLE -APIS.html (android-ndk-r8d):
Several API levels are defined. Each API level corresponds to this release of the Android system platform. The following levels are currently supported:
android-3 -> Official Android 1.5 system images android-4 -> Official Android 1.6 system images android-5 -> Official Android 2.0 system images android-6 -> Official Android 2.0.1 system images android-7 -> Official Android 2.1 system images android-8 -> Official Android 2.2 system images android-9 -> Official Android 2.3 system images android-14 -> Official Android 4.0 system images
Note that android-6 and android-7 are the same as android-5 for the NDK, meaning they provide exactly the same native ABIs!
IMPORTANT: Headers corresponding to this API level are now located under $ NDK / platform / android- / arch-arm / usr / include
source to share