Hi, today we discovered bug with cocos2d-x 3.15 on Android 4.3 similar to this one:
Our compile parameters:
Cocos2d-x 3.15
NDK: 13b
Android minsdk version: 15
Android target sdk version(PROP_TARGET_SDK_VERSION): 22
APP_PLATFORM := android-15 in Application.mk
So issue is due introduced new variable PROP_TARGET_SDK_VERSION which is used to set
targetSdkVersion PROP_TARGET_SDK_VERSION
and
externalNativeBuild {
ndkBuild {
if (!project.hasProperty("PROP_NDK_MODE") || PROP_NDK_MODE.compareTo('none') != 0) {
// skip the NDK Build step if PROP_NDK_MODE is none
targets 'MyGame'
arguments 'NDK_TOOLCHAIN_VERSION=4.9'
arguments 'APP_PLATFORM=android-'+PROP_TARGET_SDK_VERSION
def module_paths = [project.file("../../cocos2d").absolutePath,
project.file("../../cocos2d/cocos").absolutePath,
project.file("../../cocos2d/external").absolutePath]
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
// should use '/'
module_paths = module_paths.collect {it.replaceAll('\\\\', '/')}
arguments 'NDK_MODULE_PATH=' + module_paths.join(";")
}
else {
arguments 'NDK_MODULE_PATH=' + module_paths.join(':')
}
arguments '-j' + Runtime.runtime.availableProcessors()
abiFilters.addAll(PROP_APP_ABI.split(':').collect{it as String})
}
}
}
Same variable cannot be used in Target SDK and ndkBuild as it should have different version in ndkBuild (it owerwriting in Application.mk set APP_PLATFORM:=15 to APP_PLATFORM:=22 )
Please revise your logic.
I’m assuming PROP_TARGET_SDK_VERSION should set minSDK version not targetSDK version!