Cocos creator 2.2.2 can not build for android or ios

Cocos creator 2.2.2 can not build for android or ios
0

I just upgraded to cocos creator 2.2.2. Now I got a problem: for my project, cocos creator 2.2.2 does build, but then fails on compiling. I wonder whether there is any problem with my project, so I started to try with the hello world project, and I found it still fails on compiling.

I have reinstalled everything and tried several time, does not make any progress.
anyone knows what is wrong? thanks.

the following is the compiling log(since the limit for a post is 60000, so remove some part of it.):

编译模式:release
使用 Android Studio 工程:C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio
正在生成 apk 文件…
正在执行:’“C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\gradlew.bat” --parallel --info assembleRelease’

Initialized native services in: C:\Users\USER.gradle\native
Found daemon DaemonInfo{pid=4716, address=[1d75262f-ebd1-4d79-adb5-7db62784baf7 port:49459, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]], state=Idle, lastBusy=1578121939193, context=DefaultDaemonContext[uid=16530930-9029-4f04-b23f-3d098030f991,javaHome=C:\Program Files\Android\Android Studio\jre,daemonRegistryDir=C:\Users\USER.gradle\daemon,pid=4716,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]} however its context does not match the desired criteria.
Java home is different.
Wanted: DefaultDaemonContext[uid=null,javaHome=C:\Program Files\Java\jdk1.8.0_221,daemonRegistryDir=C:\Users\USER.gradle\daemon,pid=8760,idleTimeout=null,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]
Actual: DefaultDaemonContext[uid=16530930-9029-4f04-b23f-3d098030f991,javaHome=C:\Program Files\Android\Android Studio\jre,daemonRegistryDir=C:\Users\USER.gradle\daemon,pid=4716,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]

Looking for a different daemon…
Removing 0 daemon stop events from registry
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
Starting process ‘Gradle build daemon’. Working directory: C:\Users\USER.gradle\daemon\4.10.3 Command: C:\Program Files\Java\jdk1.8.0_221\bin\java.exe -XX:+HeapDumpOnOutOfMemoryError -Xmx1024m -Dfile.encoding=windows-1252 -Duser.country=US -Duser.language=en -Duser.variant -cp C:\Users\USER.gradle\wrapper\dists\gradle-4.10.3-all\47sla2vl0tc5qooe1dsb59pe1r\gradle-4.10.3\lib\gradle-launcher-4.10.3.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 4.10.3
Successfully started process ‘Gradle build daemon’
An attempt to start the daemon took 0.873 secs.
The client will now receive all logging from the daemon (pid: 5236). The daemon log file: C:\Users\USER.gradle\daemon\4.10.3\daemon-5236.out.log
Starting build in new daemon [memory: 954.7 MB]
Using 8 worker leases.
Starting Build
Settings evaluated using settings file ‘C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\settings.gradle’.
Projects loaded. Root project using build file ‘C:\cocoses\examples\helloworld\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.

Configure project :
Evaluating root project ‘proj.android-studio’ using build file ‘C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\build.gradle’.

Configure project :hello_world
Evaluating project ‘:hello_world’ using build file ‘C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\build.gradle’.
Creating configuration androidTestUtil

Creating configuration testReleaseAnnotationProcessor
Parsing the SDK, no caching allowed
Parsing C:\Users\USER\AppData\Local\Android\Sdk\build-tools\26.0.2\package.xml

Parsing C:\Users\USER\AppData\Local\Android\Sdk\tools\package.xml
SDK initialized in 4818 ms
Using incremental javac compilation for :hello_world debug.
Using incremental javac compilation for :hello_world debugUnitTest.
Using incremental javac compilation for :hello_world release.
Using incremental javac compilation for :hello_world releaseUnitTest.
Using incremental javac compilation for :hello_world debugAndroidTest.

Configure project :libcocos2dx
Evaluating project ‘:libcocos2dx’ using build file ‘C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\cocos2d-x\cocos\platform\android\libcocos2dx\build.gradle’.
Creating configuration androidTestUtil

Creating configuration testReleaseAnnotationProcessor
Parsing the SDK, no caching allowed
SDK initialized in 0 ms
Using incremental javac compilation for :libcocos2dx debug.
Using incremental javac compilation for :libcocos2dx debugUnitTest.
Using incremental javac compilation for :libcocos2dx release.
Using incremental javac compilation for :libcocos2dx releaseUnitTest.
Using incremental javac compilation for :libcocos2dx debugAndroidTest.
All projects evaluated.
Analytics other plugin to proto: Unknown plugin type com.android.build.gradle.LibraryPlugin expected enum COM_ANDROID_BUILD_GRADLE_LIBRARYPLUGIN
Selected primary task ‘assembleRelease’ from project :
Tasks to be executed: [task ‘:hello_world:checkReleaseClasspath’, task ‘:hello_world:preBuild’, task ‘:hello_world:extractProguardFiles’, task ‘:libcocos2dx:preBuild’, task ‘:libcocos2dx:preReleaseBuild’, task ‘:libcocos2dx:checkReleaseManifest’, task ‘:libcocos2dx:processReleaseManifest’, task ‘:hello_world:preReleaseBuild’, task ‘:libcocos2dx:compileReleaseAidl’, task ‘:hello_world:compileReleaseAidl’, task ‘:libcocos2dx:packageReleaseRenderscript’, task ‘:hello_world:compileReleaseRenderscript’, task ‘:hello_world:checkReleaseManifest’, task ‘:hello_world:generateReleaseBuildConfig’, task ‘:hello_world:prepareLintJar’, task ‘:hello_world:mainApkListPersistenceRelease’, task ‘:hello_world:generateReleaseResValues’, task ‘:hello_world:generateReleaseResources’, task ‘:libcocos2dx:compileReleaseRenderscript’, task ‘:libcocos2dx:generateReleaseResValues’, task ‘:libcocos2dx:generateReleaseResources’, task ‘:libcocos2dx:packageReleaseResources’, task ‘:hello_world:mergeReleaseResources’, task ‘:hello_world:createReleaseCompatibleScreenManifests’, task ‘:hello_world:processReleaseManifest’, task ‘:hello_world:splitsDiscoveryTaskRelease’, task ‘:libcocos2dx:generateReleaseRFile’, task ‘:hello_world:processReleaseResources’, task ‘:hello_world:generateReleaseSources’, task ‘:libcocos2dx:generateReleaseBuildConfig’, task ‘:libcocos2dx:prepareLintJar’, task ‘:libcocos2dx:generateReleaseSources’, task ‘:libcocos2dx:javaPreCompileRelease’, task ‘:libcocos2dx:compileReleaseJavaWithJavac’, task ‘:libcocos2dx:processReleaseJavaRes’, task ‘:libcocos2dx:transformClassesAndResourcesWithPrepareIntermediateJarsForRelease’, task ‘:hello_world:javaPreCompileRelease’, task ‘:hello_world:compileReleaseJavaWithJavac’, task ‘:hello_world:generateJsonModelRelease’, task ‘:libcocos2dx:compileReleaseNdk’, task ‘:libcocos2dx:mergeReleaseShaders’, task ‘:libcocos2dx:compileReleaseShaders’, task ‘:libcocos2dx:generateReleaseAssets’, task ‘:libcocos2dx:mergeReleaseJniLibFolders’, task ‘:libcocos2dx:transformNativeLibsWithMergeJniLibsForRelease’, task ‘:libcocos2dx:transformNativeLibsWithStripDebugSymbolForRelease’, task ‘:libcocos2dx:transformNativeLibsWithIntermediateJniLibsForRelease’, task ‘:hello_world:externalNativeBuildRelease’, task ‘:hello_world:compileReleaseSources’, task ‘:hello_world:lintVitalRelease’, task ‘:hello_world:mergeReleaseShaders’, task ‘:hello_world:compileReleaseShaders’, task ‘:hello_world:generateReleaseAssets’, task ‘:libcocos2dx:packageReleaseAssets’, task ‘:hello_world:mergeReleaseAssets’, task ‘:hello_world:checkReleaseLibraries’, task ‘:hello_world:processReleaseJavaRes’, task ‘:hello_world:transformResourcesWithMergeJavaResForRelease’, task ‘:libcocos2dx:mergeReleaseConsumerProguardFiles’, task ‘:hello_world:transformClassesAndResourcesWithProguardForRelease’, task ‘:hello_world:transformClassesWithDexBuilderForRelease’, task ‘:hello_world:transformDexArchiveWithDexMergerForRelease’, task ‘:hello_world:transformClassesAndDexWithShrinkResForRelease’, task ‘:hello_world:mergeReleaseJniLibFolders’, task ‘:hello_world:transformNativeLibsWithMergeJniLibsForRelease’, task ‘:hello_world:transformNativeLibsWithStripDebugSymbolForRelease’, task ‘:hello_world:validateSigningRelease’, task ‘:hello_world:packageRelease’, task ‘:hello_world:assembleRelease’, task ‘:libcocos2dx:extractReleaseAnnotations’, task ‘:libcocos2dx:transformResourcesWithMergeJavaResForRelease’, task ‘:libcocos2dx:transformClassesAndResourcesWithSyncLibJarsForRelease’, task ‘:libcocos2dx:transformNativeLibsWithSyncJniLibsForRelease’, task ‘:libcocos2dx:bundleReleaseAar’, task ‘:libcocos2dx:compileReleaseSources’, task ‘:libcocos2dx:mergeReleaseResources’, task ‘:libcocos2dx:verifyReleaseResources’, task ‘:libcocos2dx:assembleRelease’]
:hello_world:checkReleaseClasspath (Thread[Task worker for ‘:’,5,main]) started.
:libcocos2dx:preBuild (Thread[Task worker for ‘:’ Thread 5,5,main]) started.

Task :libcocos2dx:preBuild UP-TO-DATE
Skipping task ‘:libcocos2dx:preBuild’ as it has no actions.
:libcocos2dx:preBuild (Thread[Task worker for ‘:’ Thread 5,5,main]) completed. Took 0.059 secs.
:libcocos2dx:preReleaseBuild (Thread[Task worker for ‘:’ Thread 5,5,main]) started.

Task :libcocos2dx:assembleRelease
Skipping task ‘:libcocos2dx:assembleRelease’ as it has no actions.
:libcocos2dx:assembleRelease (Thread[Task worker for ‘:’ Thread 2,5,main]) completed. Took 0.0 secs.

Task :hello_world:externalNativeBuildRelease
Task ‘:hello_world:externalNativeBuildRelease’ is not up-to-date because:
Task has not declared any outputs despite executing actions.
externalNativeBuildRelease: starting build
externalNativeBuildRelease: reading expected JSONs
externalNativeBuildRelease: done reading expected JSONs
externalNativeBuildRelease: executing build commands for targets: ‘cocos2djs’
externalNativeBuildRelease: evaluate miniconfig
externalNativeBuildRelease: evaluate library cocos2djs-release-x86
externalNativeBuildRelease: about to build C:\Users\USER\AppData\Local\Android\Sdk\ndk\16.1.4479499\ndk-build.cmd NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\jni\Android.mk NDK_APPLICATION_MK=C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\jni\Application.mk APP_ABI=x86 NDK_ALL_ABIS=x86 NDK_DEBUG=0 APP_PLATFORM=android-16 NDK_OUT=C:/cocoses/examples/helloworld/NewProject/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj NDK_LIBS_OUT=C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\build\intermediates\ndkBuild\release\lib NDK_TOOLCHAIN_VERSION=clang NDK_MODULE_PATH=C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\cocos2d-x;C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\cocos2d-x\cocos;C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\cocos2d-x\external -j8 NDK_DEBUG=0 C:/cocoses/examples/helloworld/NewProject/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj/local/x86/libcocos2djs.so
externalNativeBuildRelease: evaluate library extension-release-x86
externalNativeBuildRelease: not building target extension because it isn’t in targets set
externalNativeBuildRelease: evaluate library vorbisidec-release-x86
externalNativeBuildRelease: not building target vorbisidec because it isn’t in targets set
externalNativeBuildRelease: evaluate library cocos2d-release-x86
externalNativeBuildRelease: not building target cocos2d because it isn’t in targets set
externalNativeBuildRelease: evaluate library audioengine-release-x86
externalNativeBuildRelease: not building target audioengine because it isn’t in targets set
externalNativeBuildRelease: evaluate library editorsupport-release-x86
externalNativeBuildRelease: not building target editorsupport because it isn’t in targets set
externalNativeBuildRelease: evaluate library cocos2dandroid-release-x86
externalNativeBuildRelease: not building target cocos2dandroid because it isn’t in targets set
externalNativeBuildRelease: evaluate library pvmp3dec-release-x86
externalNativeBuildRelease: not building target pvmp3dec because it isn’t in targets set
externalNativeBuildRelease: evaluate library cpufeatures-release-x86
externalNativeBuildRelease: not building target cpufeatures because it isn’t in targets set
Build cocos2djs x86
externalNativeBuildRelease: Executable : C:\Users\USER\AppData\Local\Android\Sdk\ndk\16.1.4479499\ndk-build.cmd
arguments :
NDK_PROJECT_PATH=null
APP_BUILD_SCRIPT=C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\jni\Android.mk
NDK_APPLICATION_MK=C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\jni\Application.mk
APP_ABI=x86
NDK_ALL_ABIS=x86
NDK_DEBUG=0
APP_PLATFORM=android-16
NDK_OUT=C:/cocoses/examples/helloworld/NewProject/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj
NDK_LIBS_OUT=C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\build\intermediates\ndkBuild\release\lib
NDK_TOOLCHAIN_VERSION=clang
NDK_MODULE_PATH=C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\cocos2d-x;C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\cocos2d-x\cocos;C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\cocos2d-x\external
-j8
NDK_DEBUG=0
C:/cocoses/examples/helloworld/NewProject/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj/local/x86/libcocos2djs.so
jvmArgs :

Executable : C:\Users\USER\AppData\Local\Android\Sdk\ndk\16.1.4479499\ndk-build.cmd
arguments :
NDK_PROJECT_PATH=null
APP_BUILD_SCRIPT=C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\jni\Android.mk
NDK_APPLICATION_MK=C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\jni\Application.mk
APP_ABI=x86
NDK_ALL_ABIS=x86
NDK_DEBUG=0
APP_PLATFORM=android-16
NDK_OUT=C:/cocoses/examples/helloworld/NewProject/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj
NDK_LIBS_OUT=C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\build\intermediates\ndkBuild\release\lib
NDK_TOOLCHAIN_VERSION=clang
NDK_MODULE_PATH=C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\cocos2d-x;C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\cocos2d-x\cocos;C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\cocos2d-x\external
-j8
NDK_DEBUG=0
C:/cocoses/examples/helloworld/NewProject/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj/local/x86/libcocos2djs.so
jvmArgs :

Starting process ‘command ‘C:\Users\USER\AppData\Local\Android\Sdk\ndk\16.1.4479499\ndk-build.cmd’’. Working directory: C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app Command: C:\Users\USER\AppData\Local\Android\Sdk\ndk\16.1.4479499\ndk-build.cmd NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\jni\Android.mk NDK_APPLICATION_MK=C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\jni\Application.mk APP_ABI=x86 NDK_ALL_ABIS=x86 NDK_DEBUG=0 APP_PLATFORM=android-16 NDK_OUT=C:/cocoses/examples/helloworld/NewProject/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj NDK_LIBS_OUT=C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\build\intermediates\ndkBuild\release\lib NDK_TOOLCHAIN_VERSION=clang NDK_MODULE_PATH=C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\cocos2d-x;C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\cocos2d-x\cocos;C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\cocos2d-x\external -j8 NDK_DEBUG=0 C:/cocoses/examples/helloworld/NewProject/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj/local/x86/libcocos2djs.so
Successfully started process ‘command ‘C:\Users\USER\AppData\Local\Android\Sdk\ndk\16.1.4479499\ndk-build.cmd’’
Android NDK: WARNING: Unsupported source file extensions in C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\cocos2d-x/cocos/Android.mk for module cocos2dx_static
Android NDK: renderer/memop/RecyclePool.hpp
[x86] Compile++ : cocos2dx_static <= jsb_gfx_auto.cpp
[x86] Compile++ : cocos2dx_static <= jsb_renderer_auto.cpp
[x86] Compile++ : cocos2dx_static <= jsb_renderer_manual.cpp
[x86] Compile++ : cocos2dx_static <= jsb_gfx_manual.cpp
[x86] Compile++ : cocos2dx_static <= jsb_video_auto.cpp
[x86] Compile++ : cocos2dx_static <= jsb_webview_auto.cpp
[x86] Compile++ : cocos2dx_static <= jsb_cocos2dx_audioengine_auto.cpp
[x86] Compile++ : cocos2dx_static <= SocketIO.cpp
[x86] Compile++ : cocos2dx_static <= WebSocket-libwebsockets.cpp
[x86] Compile++ : cocos2dx_static <= WebSocketServer.cpp
[x86] Compile++ : cocos2dx_static <= jsb_socketio.cpp
[x86] Compile++ : cocos2dx_static <= jsb_websocket.cpp
[x86] Compile++ : cocos2dx_static <= jsb_websocket_server.cpp
[x86] Compile++ : audioengine_static <= mp3reader.cpp
[x86] Compile++ : audioengine_static <= tinysndfile.cpp
[x86] Compile++ : editor_support_static <= jsb_spine_manual.cpp
[x86] Compile++ : editor_support_static <= jsb_cocos2dx_spine_auto.cpp
[x86] Compile++ : editor_support_static <= jsb_dragonbones_manual.cpp
[x86] Compile++ : editor_support_static <= jsb_cocos2dx_dragonbones_auto.cpp
[x86] Compile++ : cocos2djs_shared <= main.cpp
[x86] Compile++ : cocos2djs_shared <= AppDelegate.cpp
[x86] Compile++ : cocos2djs_shared <= jsb_module_register.cpp
[x86] Compile++ : cocos2dx_static <= cocos2d.cpp
[x86] Compile++ : cocos2dx_static <= CCFileUtils.cpp
[x86] Compile++ : cocos2dx_static <= CCImage.cpp
[x86] Compile++ : cocos2dx_static <= CCSAXParser.cpp
[x86] Compile++ : cocos2dx_static <= MathUtil.cpp
[x86] Compile++ : cocos2dx_static <= CCGeometry.cpp
[x86] Compile++ : cocos2dx_static <= CCVertex.cpp
[x86] Compile++ : cocos2dx_static <= Mat4.cpp
[x86] Compile++ : cocos2dx_static <= Quaternion.cpp
[x86] Compile++ : cocos2dx_static <= Vec2.cpp
[x86] Compile++ : cocos2dx_static <= Vec3.cpp
[x86] Compile++ : cocos2dx_static <= Vec4.cpp
[x86] Compile++ : cocos2dx_static <= Mat3.cpp
[x86] Compile++ : cocos2dx_static <= CCAutoreleasePool.cpp
[x86] Compile++ : cocos2dx_static <= CCConfiguration.cpp
[x86] Compile++ : cocos2dx_static <= CCData.cpp
[x86] Compile++ : cocos2dx_static <= CCRef.cpp
[x86] Compile++ : cocos2dx_static <= CCValue.cpp
[x86] Compile++ : cocos2dx_static <= CCThreadPool.cpp
[x86] Compile++ : cocos2dx_static <= TGAlib.cpp
[x86] Compile++ : cocos2dx_static <= ZipUtils.cpp
[x86] Compile++ : cocos2dx_static <= base64.cpp
[x86] Compile++ : cocos2dx_static <= ccCArray.cpp
[x86] Compile++ : cocos2dx_static <= ccRandom.cpp
[x86] Compile++ : cocos2dx_static <= ccTypes.cpp
[x86] Compile++ : cocos2dx_static <= ccUTF8.cpp
[x86] Compile++ : cocos2dx_static <= ccUtils.cpp
[x86] Compile++ : cocos2dx_static <= etc1.cpp
[x86] Compile++ : cocos2dx_static <= etc2.cpp
[x86] Compile++ : cocos2dx_static <= pvr.cpp
[x86] Compile++ : cocos2dx_static <= CCLog.cpp
[x86] Compile++ : cocos2dx_static <= CCScheduler.cpp
[x86] Compile++ : cocos2dx_static <= csscolorparser.cpp
[x86] Compile++ : cocos2dx_static <= CCGLUtils.cpp
[x86] Compile++ : cocos2dx_static <= CCRenderTexture.cpp
C:/cocoses/examples/helloworld/NewProject/build/jsb-default/frameworks/cocos2d-x/cocos/base/CCGLUtils.cpp:86:66: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
if(activeTextureUnit < MAX_TEXTURE_UNIT && activeTextureUnit >= 0)
~~~~~~~~~~~~~~~~~ ^ ~
1 warning generated.
[x86] Compile++ : cocos2dx_static <= LocalStorage-android.cpp
[x86] Compile++ : cocos2dx_static <= CCDownloader.cpp
[x86] Compile++ : cocos2dx_static <= CCDownloader-android.cpp
[x86] Compile++ : cocos2dx_static <= Uri.cpp
[x86] Compile++ : cocos2dx_static <= HttpClient-android.cpp
[x86] Compile++ : cocos2dx_static <= jsb_cocos2dx_auto.cpp
[x86] Compile++ : cocos2dx_static <= jsb_cocos2dx_extension_auto.cpp
[x86] Compile++ : cocos2dx_static <= jsb_cocos2dx_network_auto.cpp
[x86] Compile++ : cocos2dx_static <= JavaScriptJavaBridge.cpp
error: error opening 'C:/cocoses/examples/helloworld/NewProject/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj/local/x86/objs/editor_support_static//scripting/js-bindings/auto/jsb_cocos2dx_dragonbones_auto.o.d’: No such file or directory
1 error generated.
make: *** [C:/cocoses/examples/helloworld/NewProject/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj/local/x86/objs/editor_support_static/
/scripting/js-bindings/auto/jsb_cocos2dx_dragonbones_auto.o] Error 1
make: *** Waiting for unfinished jobs…

Task :hello_world:externalNativeBuildRelease FAILED
:hello_world:externalNativeBuildRelease (Thread[Task worker for ‘:’ Thread 6,5,main]) completed. Took 21.441 secs.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:hello_world:externalNativeBuildRelease’.

Build command failed.
Error while executing process C:\Users\USER\AppData\Local\Android\Sdk\ndk\16.1.4479499\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\jni\Android.mk NDK_APPLICATION_MK=C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\jni\Application.mk APP_ABI=x86 NDK_ALL_ABIS=x86 NDK_DEBUG=0 APP_PLATFORM=android-16 NDK_OUT=C:/cocoses/examples/helloworld/NewProject/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj NDK_LIBS_OUT=C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\runtime-src\proj.android-studio\app\build\intermediates\ndkBuild\release\lib NDK_TOOLCHAIN_VERSION=clang NDK_MODULE_PATH=C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\cocos2d-x;C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\cocos2d-x\cocos;C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\cocos2d-x\external -j8 NDK_DEBUG=0 C:/cocoses/examples/helloworld/NewProject/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj/local/x86/libcocos2djs.so}
Android NDK: WARNING: Unsupported source file extensions in C:\cocoses\examples\helloworld\NewProject\build\jsb-default\frameworks\cocos2d-x/cocos/Android.mk for module cocos2dx_static
Android NDK: renderer/memop/RecyclePool.hpp
[x86] Compile++ : cocos2dx_static <= jsb_gfx_auto.cpp
[x86] Compile++ : cocos2dx_static <= jsb_renderer_auto.cpp
[x86] Compile++ : cocos2dx_static <= jsb_renderer_manual.cpp
[x86] Compile++ : cocos2dx_static <= jsb_gfx_manual.cpp
[x86] Compile++ : cocos2dx_static <= jsb_video_auto.cpp
[x86] Compile++ : cocos2dx_static <= jsb_webview_auto.cpp
[x86] Compile++ : cocos2dx_static <= jsb_cocos2dx_audioengine_auto.cpp
[x86] Compile++ : cocos2dx_static <= SocketIO.cpp
[x86] Compile++ : cocos2dx_static <= WebSocket-libwebsockets.cpp
[x86] Compile++ : cocos2dx_static <= WebSocketServer.cpp
[x86] Compile++ : cocos2dx_static <= jsb_socketio.cpp
[x86] Compile++ : cocos2dx_static <= jsb_websocket.cpp
[x86] Compile++ : cocos2dx_static <= jsb_websocket_server.cpp
[x86] Compile++ : audioengine_static <= mp3reader.cpp
[x86] Compile++ : audioengine_static <= tinysndfile.cpp
[x86] Compile++ : editor_support_static <= jsb_spine_manual.cpp
[x86] Compile++ : editor_support_static <= jsb_cocos2dx_spine_auto.cpp
[x86] Compile++ : editor_support_static <= jsb_dragonbones_manual.cpp
[x86] Compile++ : editor_support_static <= jsb_cocos2dx_dragonbones_auto.cpp
[x86] Compile++ : cocos2djs_shared <= main.cpp
[x86] Compile++ : cocos2djs_shared <= AppDelegate.cpp
[x86] Compile++ : cocos2djs_shared <= jsb_module_register.cpp
[x86] Compile++ : cocos2dx_static <= cocos2d.cpp
[x86] Compile++ : cocos2dx_static <= CCFileUtils.cpp
[x86] Compile++ : cocos2dx_static <= CCImage.cpp
[x86] Compile++ : cocos2dx_static <= CCSAXParser.cpp
[x86] Compile++ : cocos2dx_static <= MathUtil.cpp
[x86] Compile++ : cocos2dx_static <= CCGeometry.cpp
[x86] Compile++ : cocos2dx_static <= CCVertex.cpp
[x86] Compile++ : cocos2dx_static <= Mat4.cpp
[x86] Compile++ : cocos2dx_static <= Quaternion.cpp
[x86] Compile++ : cocos2dx_static <= Vec2.cpp
[x86] Compile++ : cocos2dx_static <= Vec3.cpp
[x86] Compile++ : cocos2dx_static <= Vec4.cpp
[x86] Compile++ : cocos2dx_static <= Mat3.cpp
[x86] Compile++ : cocos2dx_static <= CCAutoreleasePool.cpp
[x86] Compile++ : cocos2dx_static <= CCConfiguration.cpp
[x86] Compile++ : cocos2dx_static <= CCData.cpp
[x86] Compile++ : cocos2dx_static <= CCRef.cpp
[x86] Compile++ : cocos2dx_static <= CCValue.cpp
[x86] Compile++ : cocos2dx_static <= CCThreadPool.cpp
[x86] Compile++ : cocos2dx_static <= TGAlib.cpp
[x86] Compile++ : cocos2dx_static <= ZipUtils.cpp
[x86] Compile++ : cocos2dx_static <= base64.cpp
[x86] Compile++ : cocos2dx_static <= ccCArray.cpp
[x86] Compile++ : cocos2dx_static <= ccRandom.cpp
[x86] Compile++ : cocos2dx_static <= ccTypes.cpp
[x86] Compile++ : cocos2dx_static <= ccUTF8.cpp
[x86] Compile++ : cocos2dx_static <= ccUtils.cpp
[x86] Compile++ : cocos2dx_static <= etc1.cpp
[x86] Compile++ : cocos2dx_static <= etc2.cpp
[x86] Compile++ : cocos2dx_static <= pvr.cpp
[x86] Compile++ : cocos2dx_static <= CCLog.cpp
[x86] Compile++ : cocos2dx_static <= CCScheduler.cpp
[x86] Compile++ : cocos2dx_static <= csscolorparser.cpp
[x86] Compile++ : cocos2dx_static <= CCGLUtils.cpp
[x86] Compile++ : cocos2dx_static <= CCRenderTexture.cpp
C:/cocoses/examples/helloworld/NewProject/build/jsb-default/frameworks/cocos2d-x/cocos/base/CCGLUtils.cpp:86:66: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
if(activeTextureUnit < MAX_TEXTURE_UNIT && activeTextureUnit >= 0)
~~~~~~~~~~~~~~~~~ ^ ~
1 warning generated.
[x86] Compile++ : cocos2dx_static <= LocalStorage-android.cpp
[x86] Compile++ : cocos2dx_static <= CCDownloader.cpp
[x86] Compile++ : cocos2dx_static <= CCDownloader-android.cpp
[x86] Compile++ : cocos2dx_static <= Uri.cpp
[x86] Compile++ : cocos2dx_static <= HttpClient-android.cpp
[x86] Compile++ : cocos2dx_static <= jsb_cocos2dx_auto.cpp
[x86] Compile++ : cocos2dx_static <= jsb_cocos2dx_extension_auto.cpp
[x86] Compile++ : cocos2dx_static <= jsb_cocos2dx_network_auto.cpp
[x86] Compile++ : cocos2dx_static <= JavaScriptJavaBridge.cpp
error: error opening 'C:/cocoses/examples/helloworld/NewProject/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj/local/x86/objs/editor_support_static//scripting/js-bindings/auto/jsb_cocos2dx_dragonbones_auto.o.d’: No such file or directory
1 error generated.
make: *** [C:/cocoses/examples/helloworld/NewProject/build/jsb-default/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj/local/x86/objs/editor_support_static/
/scripting/js-bindings/auto/jsb_cocos2dx_dragonbones_auto.o] Error 1
make: *** Waiting for unfinished jobs…

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

  • Get more help at https://help.gradle.org49 actionable tasks: 49 executed
    AAPT2 aapt2-3.2.0-4818971-windows Daemon #0: shutdown
    AAPT2 aapt2-3.2.0-4818971-windows Daemon #1: shutdown
    AAPT2 aapt2-3.2.0-4818971-windows Daemon #2: shutdown
    AAPT2 aapt2-3.2.0-4818971-windows Daemon #3: shutdown
    AAPT2 aapt2-3.2.0-4818971-windows Daemon #4: shutdown
    AAPT2 aapt2-3.2.0-4818971-windows Daemon #5: shutdown

BUILD FAILED in 35s
执行命令出错,返回值:1。

Sad to hear that. Did you have internet connection online, while building the APK?
You did the compile with CC 2.22, right … Maybe you can try “inteliJ” IDE for creating the APK. IntliJ inform me much better whats going on, if something went wrong

By the way, it works with cocos creator 2.2.0. so Now I am using cocos creator 2.2.0 rather than 2.2.2.