Include Path issue with Codeworks for Android 1R7

I installed the latest Codeworks for Android 1R7, and it appears that it is not adjusting the include paths based on the Android API specified. In my Visual Studio projects, my include paths contain the $(PlatformIncludePaths) macro. I am not sure where that macro is being defined, but it includes the following directories:

NDKROOT\sysroot\usr\include
NDKROOT\sysroot\usr\include\arm-linus-androideabi

I don’t know what API version of files sysroot contains, but it appears it might be the latest (android-26). The problem is that this path doesn’t change based on my Min/Target/Max/Native Android API Level settings in my project’s Configuration Properties->General settings.

So I have some questions:

  1. Where is $(PlatformIncludePath) being set?
  2. Is it a bug that $(PlatformIncludePath) isn’t relative to the project’s specified API levels?
  3. If this is not a bug, is there something else I should be doing so that my include paths point to the proper API level’s include directories?

Looking at this a bit more, if my understanding is correct, the version of include files in NDKROOT\sysroot\usr\include is a superset of the individual API level includes. And it uses the ANDROID_API preprocessor define to build with the selected API level from project settings.

Is that correct?

Hi MichaelBean,

You’ve discovered unified headers, the feature of newer NDKs
https://android.googlesource.com/platform/ndk.git/+/master/docs/UnifiedHeaders.md
https://android.googlesource.com/platform/ndk/+/ndk-release-r16/docs/UnifiedHeadersMigration.md

Note that the legacy platform headers were removed in NDK r16
https://github.com/android-ndk/ndk/wiki/Changelog-r16#announcements

Yes, it is.