Why NDK android-21 or later won't run on pre-5.0 devices?

Hi,

I’m trying to use ndk android-23 platform for building additional java library project and I want to know why tooltip for NDK API Level (Project Settings->Platforms->Android SDK) says that choosing android-21 or later won’t run on pre-5.0 devices?

I also realized that each new release of NDK headers and libraries for a given Android API level is cumulative (http://developer.android.com/intl/ru/ndk/guides/stable_apis.html, paragraph after Table 1) and using of higher NDK API Level adds support for more devices.

Thanks.

Unfortunately starting with android-21 Google made changes to Bionic and the standard headers. The libc on devices before Lollipop will fail to find dependencies and crash if an NDK past android-19 is used. For this reason if you use NDK-21 or higher you also should set minimum SDK to 21 to prevent installing on older devices. 4.12 will do this automatically.

Higher SDK versions are allowed since the Java side can check the OS version before calling (it does late binding). SDK 23 cannot be used, though, right now due to the OBB downloader using the APK expansion library from Google which uses an older notification API the removed in 23, and a dependency on apache they also moved to extras instead of the standard jar set. I’m working on this for 4.12 at the moment which will also allow API 24 (Android N).

Thank you so much for quick response, Chris.
So I think I’ll switch my development to 2 .apk, first for ndk android-19 and second for ndk android-21 or later.