Is it possible to define a minimum API level and a target API level in NDK, same as in the java manifest?
I only know I can use APP_PLATFORM to specify the target, but what if I want to set also that the minimum API?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No. You can’t specify that kind of information inside the NDK build system because each version of Android system image is different.
And for native code the portability aspect is different than when your application is
written in Java only.
You will most probably have to compile your code against different APP_PLATFORM’s if you want to support different versions of Android with native code.
As you said, you can only use the APP_PLATFORM directive inside the Application.mk file, which is documented as:
Parts from docs/STABLE-APIS.html (android-ndk-r8d):