Conversation

Do you know what compileSdkVersion means in practice? If that determines the java toolchain you get when building with gradle-controlling-CMake, but I am getting the minSdkVersion java toolchain when using Cmake directly, that might explain the discrepancy
1
compileSdkVersion is the toolchain version and you're meant to always use the latest one. You should be ending up building everything (Java and native) with latest toolchain but with minSdkVersion set appropriately (__ANDROID_API__ for native) so it's backwards compatible.
1
compileSdkVersion 30 should pretty much just work. targetSdkVersion 30 requires supporting the latest restrictions, changes, etc. for newer API levels while still having code to support the older API levels you support so that actually involves work and runtime code decisions.
1
You should probably still use compileSdkVersion 30 to have newer tools with a bunch of bug fixes and improvements but might as well leave targetSdkVersion at 26 if they don't make you deal with the newer restrictions and wouldn't be able to properly test higher than 26 anyway.
1
Is it surprising to you I am hitting the chk issue at CMake-minSdkVersion 23, given I now know (because I get the duplicate symbol error) that __ANDROID_API__ is being set properly to the minSdkVersion?
1
It should be fine if it's actually set to the same value that you end up having for minSdkVersion at runtime. If it's 26 for the native code and 23 at runtime, it'll break. If you set minSdkVersion to 26 so it matched it wouldn't break, since it'd match what it's using to build.
1
Show replies