编译示例hello_world报错:A problem occurred configuring project ':libcocos2dx'

编译模式:release
使用 Android Studio 工程:G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio
未指定 Android 目标平台版本,自动查找一个可用版本…
正在执行:’“E:\Android-SDK\tools\android” update project -t android-20 -p G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app’

Updated project.properties
Updated local.properties
No project name specified, using Activity name ‘AppActivity’.
If you wish to change it, edit the first line of build.xml.
Added file G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\build.xml
Added file G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\proguard-project.txt
正在执行 ndk-build…
NDK 编译模式:release
NDK_TOOLCHAIN_VERSION: 4.9
正在执行:’“E:\android-ndk-r10e\ndk-build” -C G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app -j8 NDK_MODULE_PATH=G:\cocosProject\NewProject\build\jsb-default\frameworks\cocos2d-x;G:\cocosProject\NewProject\build\jsb-default\frameworks\cocos2d-x\cocos;G:\cocosProject\NewProject\build\jsb-default\frameworks\cocos2d-x\external NDK_TOOLCHAIN_VERSION=4.9’

make.exe: Entering directory G:/cocosProject/NewProject/build/jsb-default/frameworks/runtime-src/proj.android-studio/app' [armeabi-v7a] StaticLibrary : libcocos2d.a 省略.... [armeabi-v7a] Compile++ arm : cocos2d_js_static <= js_bindings_chipmunk_auto_classes.cpp G:/cocosProject/NewProject/build/jsb-default/frameworks/cocos2d-x/cocos/scripting/js-bindings/proj.android/../manual/network/XMLHTTPRequest.cpp: In member function 'void MinXmlHttpRequest::_sendRequest(JSContext*)': G:/cocosProject/NewProject/build/jsb-default/frameworks/cocos2d-x/cocos/scripting/js-bindings/proj.android/../manual/network/XMLHTTPRequest.cpp:261:106: warning: 'void cocos2d::network::HttpRequest::setResponseCallback(cocos2d::Ref*, const ccHttpRequestCallback&)' is deprecated (declared at G:/cocosProject/NewProject/build/jsb-default/frameworks/cocos2d-x/cocos/network/HttpRequest.h:250) [-Wdeprecated-declarations] _httpRequest->setResponseCallback(this, CC_CALLBACK_2(MinXmlHttpRequest::handle_requestResponse,this)); ^ [armeabi-v7a] Compile++ arm : cocos2d_js_static <= js_bindings_chipmunk_functions.cpp 省略.... [armeabi-v7a] Compile++ thumb: cocos2dxandroid_static <= JniHelper.cpp [armeabi-v7a] Compile++ thumb: cocos2dxandroid_static <= TouchesJni.cpp G:/cocosProject/NewProject/build/jsb-default/frameworks/cocos2d-x/cocos/platform/android/javaactivity-android.cpp: In function 'void Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeInit(JNIEnv*, jobject, jint, jint)': G:/cocosProject/NewProject/build/jsb-default/frameworks/cocos2d-x/cocos/platform/android/javaactivity-android.cpp:75:34: warning: 'void cocos2d::DrawPrimitives::init()' is deprecated (declared at G:/cocosProject/NewProject/build/jsb-default/frameworks/cocos2d-x/cocos/platform/android/../../2d/CCDrawingPrimitives.h:88) [-Wdeprecated-declarations] cocos2d::DrawPrimitives::init(); ^ G:/cocosProject/NewProject/build/jsb-default/frameworks/cocos2d-x/cocos/platform/android/javaactivity-android.cpp:75:39: warning: 'void cocos2d::DrawPrimitives::init()' is deprecated (declared at G:/cocosProject/NewProject/build/jsb-default/frameworks/cocos2d-x/cocos/platform/android/../../2d/CCDrawingPrimitives.h:88) [-Wdeprecated-declarations] cocos2d::DrawPrimitives::init(); ^ [armeabi-v7a] Compile thumb : cpufeatures <= cpu-features.c [armeabi-v7a] StaticLibrary : libjscocos2d.a [armeabi-v7a] StaticLibrary : libcocostudio.a [armeabi-v7a] StaticLibrary : libcocosbuilder.a [armeabi-v7a] StaticLibrary : libspine.a [armeabi-v7a] StaticLibrary : libcreator.a [armeabi-v7a] StaticLibrary : libnetwork.a [armeabi-v7a] StaticLibrary : libui.a [armeabi-v7a] StaticLibrary : libcocosdenshion.a [armeabi-v7a] StaticLibrary : libextension.a [armeabi-v7a] StaticLibrary : libaudioengine.a [armeabi-v7a] StaticLibrary : libcocos2dxinternal.a [armeabi-v7a] StaticLibrary : libcocos2dandroid.a [armeabi-v7a] StaticLibrary : libcpufeatures.a [armeabi-v7a] SharedLibrary : libcocos2djs.so E:/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld.exe: warning: cannot scan executable section 27 of G:/cocosProject/NewProject/build/jsb-default/frameworks/cocos2d-x/external/android/armeabi-v7a/libjs_static.a(Marking.o) for Cortex-A8 erratum because it has no mapping symbols. 省略.... E:/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld.exe: warning: cannot scan executable section 1 of G:/cocosProject/NewProject/build/jsb-default/frameworks/cocos2d-x/external/android/armeabi-v7a/libjs_static.a(BaselineFrameInfo.o) for Cortex-A8 erratum because it has no mapping symbols. E:/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld.exe: warning: cannot scan executable section 8 of G:/cocosProject/NewProject/build/jsb-default/frameworks/cocos2d-x/external/android/armeabi-v7a/libjs_static.a(BaselineCompiler-shared.o) for Cortex-A8 erratum because it has no mapping symbols. [armeabi-v7a] Install : libcocos2djs.so => libs/armeabi-v7a/libcocos2djs.so make.exe: Leaving directory G:/cocosProject/NewProject/build/jsb-default/frameworks/runtime-src/proj.android-studio/app’
正在生成 apk 文件…
正在执行:’“G:\CocosCreator\resources\cocos2d-x\tools\cocos2d-console\bin\cocos” jscompile -s “G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets” -d “G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets” --env “COCOS_X_ROOT=G:\CocosCreator\resources\cocos2d-x;ANDROID_SDK_ROOT=E:\Android-SDK;COCOS_CONSOLE_ROOT=G:\CocosCreator\resources\cocos2d-x\tools\cocos2d-console\bin;NDK_ROOT=E:\android-ndk-r10e;COCOS_FRAMEWORKS=G:\CocosCreator\resources;ANT_ROOT=E:\apache-ant-1.9.7\bin”’

正在处理 js 文件。
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\main.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\ccui\jsb_ccui_create_apis.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\ccui\jsb_ccui_deprecated.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\ccui\jsb_ccui_property_apis.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\ccui\jsb_ccui_property_impls.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\ccui\jsb_cocos2d_ui.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\chipmunk\jsb_chipmunk.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\chipmunk\jsb_chipmunk_constants.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\debugger\actors\common.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\debugger\actors\object.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\debugger\actors\root.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\debugger\actors\script.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\debugger\actors\utils\ScriptStore.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\debugger\actors\utils\TabSources.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\debugger\actors\webconsole.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\debugger\core\promise.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\debugger\DevToolsUtils.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\debugger\event-emitter.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\debugger\main.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\debugger\transport.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\debugger\webconsole\utils.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\extension\jsb_cocos2d_extension.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\extension\jsb_ext_create_apis.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\extension\jsb_ext_property_apis.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\jsb.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\jsb_audioengine.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\jsb_boot.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\jsb_cocos2d.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\jsb_cocos2d_constants.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\jsb_cocosbuilder.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\jsb_common.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\jsb_create_apis.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\jsb_debugger.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\jsb_deprecated.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\jsb_loaders.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\jsb_opengl.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\jsb_opengl_constants.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\jsb_pool.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\jsb_prepare.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\jsb_property_apis.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\jsb_property_impls.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\jsb_spine.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\physicsSprite\jsb_physicsSprite.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\runtime\jsb_runtime.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\runtime\jsb_runtime_md5.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\studio\jsb_cocos2d_studio.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\studio\jsb_studio_boot.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\studio\jsb_studio_create_apis.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\studio\jsb_studio_load.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\studio\jsb_studio_property_apis.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\studio\parsers\action-1.x.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\studio\parsers\action-2.x.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\studio\parsers\compatible.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\studio\parsers\scene-1.x.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\studio\parsers\timelineParser-1.x.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\studio\parsers\timelineParser-2.x.js 编译为字节码…
正在将 G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\assets\script\studio\parsers\uiParser-1.x.js 编译为字节码…
编译完成。
正在执行:’“G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\gradlew.bat” --parallel --info assembleRelease’

Starting Build
Compiling settings file ‘G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\settings.gradle’ using SubsetScriptTransformer.
Compiling settings file ‘G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\settings.gradle’ using BuildScriptTransformer.
Settings evaluated using settings file ‘G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\settings.gradle’.
Projects loaded. Root project using build file ‘G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\build.gradle’.
Included projects: [root project ‘proj.android-studio’, project ‘:hello_world’, project ‘:libcocos2dx’]
Parallel execution is an incubating feature.
Evaluating root project ‘proj.android-studio’ using build file ‘G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\build.gradle’.
Compiling build file ‘G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\build.gradle’ using SubsetScriptTransformer.
Compiling build file ‘G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\build.gradle’ using BuildScriptTransformer.
Evaluating project ‘:hello_world’ using build file ‘G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\build.gradle’.
Compiling build file ‘G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\build.gradle’ using SubsetScriptTransformer.
Compiling build file ‘G:\cocosProject\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\build.gradle’ using BuildScriptTransformer.
Creating configuration compile.
Creating configuration apk.
Creating configuration provided.
Creating configuration wearApp.
Creating configuration androidTestCompile.
Creating configuration androidTestApk.
Creating configuration androidTestProvided.
Creating configuration androidTestWearApp.
Creating configuration testCompile.
Creating configuration testApk.
Creating configuration testProvided.
Creating configuration testWearApp.
Creating configuration debugCompile.
Creating configuration debugApk.
Creating configuration debugProvided.
Creating configuration debugWearApp.
Creating configuration testDebugCompile.
Creating configuration testDebugApk.
Creating configuration testDebugProvided.
Creating configuration testDebugWearApp.
Creating configuration releaseCompile.
Creating configuration releaseApk.
Creating configuration releaseProvided.
Creating configuration releaseWearApp.
Creating configuration testReleaseCompile.
Creating configuration testReleaseApk.
Creating configuration testReleaseProvided.
Creating configuration testReleaseWearApp.
Evaluating project ‘:libcocos2dx’ using build file ‘G:\cocosProject\NewProject\build\jsb-default\frameworks\cocos2d-x\cocos\platform\android\libcocos2dx\build.gradle’.
Compiling build file ‘G:\cocosProject\NewProject\build\jsb-default\frameworks\cocos2d-x\cocos\platform\android\libcocos2dx\build.gradle’ using SubsetScriptTransformer.
Compiling build file ‘G:\cocosProject\NewProject\build\jsb-default\frameworks\cocos2d-x\cocos\platform\android\libcocos2dx\build.gradle’ using BuildScriptTransformer.
Creating configuration compile.
Creating configuration publish.
Creating configuration provided.
Creating configuration wearApp.
Creating configuration androidTestCompile.
Creating configuration androidTestPublish.
Creating configuration androidTestProvided.
Creating configuration androidTestWearApp.
Creating configuration testCompile.
Creating configuration testPublish.
Creating configuration testProvided.
Creating configuration testWearApp.
Creating configuration debugCompile.
Creating configuration debugPublish.
Creating configuration debugProvided.
Creating configuration debugWearApp.
Creating configuration testDebugCompile.
Creating configuration testDebugPublish.
Creating configuration testDebugProvided.
Creating configuration testDebugWearApp.
Creating configuration releaseCompile.
Creating configuration releasePublish.
Creating configuration releaseProvided.
Creating configuration releaseWearApp.
Creating configuration testReleaseCompile.
Creating configuration testReleasePublish.
Creating configuration testReleaseProvided.
Creating configuration testReleaseWearApp.

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ‘:hello_world’.

A problem occurred configuring project ‘:libcocos2dx’.
failed to find Build Tools revision 23.0.3

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

BUILD FAILED

Total time: 23.503 secs
Stopped 0 compiler daemon(s).
执行命令出错,返回值:1。

谁知道这个报错怎么解决?

1.2 的内测版本确实有这个问题,可以通过手动将 [项目目录]/jsb-default/frameworks/cocos2d-x/cocos/platforms/android/libcocos2dx/build.gradle 中的 buildToolsVersion 改为 22.0.1 来解决。

1.2 正式版会修复此问题。谢谢反馈!