用cocos2dx3.16新建了个Helloword项目,在Android studio3.0上面编译一直报错
Information:Gradle tasks [:TestGameDemo:assembleDebug]
Warning:Targeted device ABI or comma-delimited ABIs [x86,armeabi-v7a] is not one of [armeabi]. Nothing to build.
Warning:Targeted device ABI or comma-delimited ABIs [x86,armeabi-v7a] is not one of [armeabi]. Nothing to build.
Error:Execution failed for task ‘:TestGameDemo:externalNativeBuildDebug’.
Unexpected native build target MyGame. Valid values are:
Information:BUILD FAILED in 6s
Information:1 error
Information:2 warnings
Information:See complete output in console
不知道是不是build.gradle里面nkdBuild设置问题,
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_APP_PLATFORM
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})
}
}
}
需要修改什么了?