Is it possible to use the latest APP_PLATFORM while maintaining backward compatibility?

Here is my Application.mk:

APP_ABI := armeabi-v7a APP_PLATFORM := android-16 APP_OPTIM := release APP_STL := gnustl_static APP_CPPFLAGS := -std=gnu++11 

The value for APP_PLATFORM is android-16, so we can support Android OS version 4.1 and higher.

I know the application builds perfectly with APP_PLATFORM installed on android-16 . This means that I am not using any Android functionality that is newer than android-16 . What if I change it to android-19 ? Since I am not using any of the new Android features, I think the code should still work fine on OS 4.1. Please share your wisdom. Best wishes.

+3
android android-ndk
source share
1 answer

Bionic headers haven't changed between android-16 and android-19 (they changed a lot with android-21), so you can compile the android-19 file perfectly and work on android-16 devices.

BUT NDK platforms should not be backward compatible. Compiling to a higher platform than the one that will work in your lib is incorrect.

All platforms that are part of the NDK are supported and bug fixes, so there is no reason to build against a higher platform if you are not using new features.

+4
source share

All Articles