默认hello world项目编译Android失败

  • Creator 版本:2.0.2

  • 目标平台: Android

  • 详细报错信息,包含调用堆栈:

Trying to start C:\Users\TaoQi\AppData\Local\Android\Sdk\build-tools\27.0.3\aapt2.exe
Trying to start C:\Users\TaoQi\AppData\Local\Android\Sdk\build-tools\27.0.3\aapt2.exe
Trying to start C:\Users\TaoQi\AppData\Local\Android\Sdk\build-tools\27.0.3\aapt2.exe
Trying to start C:\Users\TaoQi\AppData\Local\Android\Sdk\build-tools\27.0.3\aapt2.exe
Started 2059579470
:hello_world:processReleaseManifest (Thread[Daemon worker Thread 10,5,main]) completed. Took 0.151 secs.
:hello_world:generateJsonModelRelease (Thread[Daemon worker Thread 10,5,main]) started.
:hello_world:generateJsonModelRelease
Putting task artifact state for task ‘:hello_world:generateJsonModelRelease’ into context took 0.0 secs.
Skipping task ‘:hello_world:generateJsonModelRelease’ as it is up-to-date (took 0.001 secs).
:hello_world:generateJsonModelRelease UP-TO-DATE
:hello_world:generateJsonModelRelease (Thread[Daemon worker Thread 10,5,main]) completed. Took 0.001 secs.
:hello_world:externalNativeBuildRelease (Thread[Daemon worker Thread 10,5,main]) started.
:hello_world:externalNativeBuildRelease
Putting task artifact state for task ‘:hello_world:externalNativeBuildRelease’ into context took 0.0 secs.
Executing task ‘:hello_world:externalNativeBuildRelease’ (up-to-date check took 0.0 secs) due to:
Task has not declared any outputs.
externalNativeBuildRelease: starting build
externalNativeBuildRelease: reading expected JSONs
externalNativeBuildRelease: done reading expected JSONs
externalNativeBuildRelease: executing build commands for targets: ‘cocos2djs’
externalNativeBuildRelease: about to build C:\Users\TaoQi\AppData\Local\Android\Sdk\ndk-bundle\ndk-build.cmd NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Users\TaoQi\Desktop\cocos_android\hello\test\build\jsb-link\frameworks\runtime-src\proj.android-studio\app\jni\Android.mk NDK_APPLICATION_MK=C:\Users\TaoQi\Desktop\cocos_android\hello\test\build\jsb-link\frameworks\runtime-src\proj.android-studio\app\jni\Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=0 APP_PLATFORM=android-16 NDK_OUT=C:/Users/TaoQi/Desktop/cocos_android/hello/test/build/jsb-link/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj NDK_LIBS_OUT=C:\Users\TaoQi\Desktop\cocos_android\hello\test\build\jsb-link\frameworks\runtime-src\proj.android-studio\app\build\intermediates\ndkBuild\release\lib NDK_TOOLCHAIN_VERSION=4.9 NDK_MODULE_PATH=C:\CocosCreator\resources\cocos2d-x;C:\CocosCreator\resources\cocos2d-x\cocos;C:\CocosCreator\resources\cocos2d-x\external -j4 NDK_DEBUG=0 C:/Users/TaoQi/Desktop/cocos_android/hello/test/build/jsb-link/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj/local/armeabi-v7a/libcocos2djs.so
externalNativeBuildRelease: not building target pvmp3dec because it isn’t in targets set
externalNativeBuildRelease: not building target cocos2dandroid because it isn’t in targets set
externalNativeBuildRelease: not building target extension because it isn’t in targets set
externalNativeBuildRelease: not building target network because it isn’t in targets set
externalNativeBuildRelease: not building target vorbisidec because it isn’t in targets set
externalNativeBuildRelease: not building target audioengine because it isn’t in targets set
externalNativeBuildRelease: not building target cocos2d because it isn’t in targets set
externalNativeBuildRelease: not building target cpufeatures because it isn’t in targets set
Build cocos2djs armeabi-v7a
externalNativeBuildRelease: Executable : C:\Users\TaoQi\AppData\Local\Android\Sdk\ndk-bundle\ndk-build.cmd
arguments :
NDK_PROJECT_PATH=null
APP_BUILD_SCRIPT=C:\Users\TaoQi\Desktop\cocos_android\hello\test\build\jsb-link\frameworks\runtime-src\proj.android-studio\app\jni\Android.mk
NDK_APPLICATION_MK=C:\Users\TaoQi\Desktop\cocos_android\hello\test\build\jsb-link\frameworks\runtime-src\proj.android-studio\app\jni\Application.mk
APP_ABI=armeabi-v7a
NDK_ALL_ABIS=armeabi-v7a
NDK_DEBUG=0
APP_PLATFORM=android-16
NDK_OUT=C:/Users/TaoQi/Desktop/cocos_android/hello/test/build/jsb-link/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj
NDK_LIBS_OUT=C:\Users\TaoQi\Desktop\cocos_android\hello\test\build\jsb-link\frameworks\runtime-src\proj.android-studio\app\build\intermediates\ndkBuild\release\lib
NDK_TOOLCHAIN_VERSION=4.9
NDK_MODULE_PATH=C:\CocosCreator\resources\cocos2d-x;C:\CocosCreator\resources\cocos2d-x\cocos;C:\CocosCreator\resources\cocos2d-x\external
-j4
NDK_DEBUG=0
C:/Users/TaoQi/Desktop/cocos_android/hello/test/build/jsb-link/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj/local/armeabi-v7a/libcocos2djs.so
jvmArgs :

Executable : C:\Users\TaoQi\AppData\Local\Android\Sdk\ndk-bundle\ndk-build.cmd
arguments :
NDK_PROJECT_PATH=null
APP_BUILD_SCRIPT=C:\Users\TaoQi\Desktop\cocos_android\hello\test\build\jsb-link\frameworks\runtime-src\proj.android-studio\app\jni\Android.mk
NDK_APPLICATION_MK=C:\Users\TaoQi\Desktop\cocos_android\hello\test\build\jsb-link\frameworks\runtime-src\proj.android-studio\app\jni\Application.mk
APP_ABI=armeabi-v7a
NDK_ALL_ABIS=armeabi-v7a
NDK_DEBUG=0
APP_PLATFORM=android-16
NDK_OUT=C:/Users/TaoQi/Desktop/cocos_android/hello/test/build/jsb-link/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj
NDK_LIBS_OUT=C:\Users\TaoQi\Desktop\cocos_android\hello\test\build\jsb-link\frameworks\runtime-src\proj.android-studio\app\build\intermediates\ndkBuild\release\lib
NDK_TOOLCHAIN_VERSION=4.9
NDK_MODULE_PATH=C:\CocosCreator\resources\cocos2d-x;C:\CocosCreator\resources\cocos2d-x\cocos;C:\CocosCreator\resources\cocos2d-x\external
-j4
NDK_DEBUG=0
C:/Users/TaoQi/Desktop/cocos_android/hello/test/build/jsb-link/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj/local/armeabi-v7a/libcocos2djs.so
jvmArgs :

Starting process ‘command ‘C:\Users\TaoQi\AppData\Local\Android\Sdk\ndk-bundle\ndk-build.cmd’’. Working directory: C:\Users\TaoQi\Desktop\cocos_android\hello\test\build\jsb-link\frameworks\runtime-src\proj.android-studio\app Command: C:\Users\TaoQi\AppData\Local\Android\Sdk\ndk-bundle\ndk-build.cmd NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Users\TaoQi\Desktop\cocos_android\hello\test\build\jsb-link\frameworks\runtime-src\proj.android-studio\app\jni\Android.mk NDK_APPLICATION_MK=C:\Users\TaoQi\Desktop\cocos_android\hello\test\build\jsb-link\frameworks\runtime-src\proj.android-studio\app\jni\Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=0 APP_PLATFORM=android-16 NDK_OUT=C:/Users/TaoQi/Desktop/cocos_android/hello/test/build/jsb-link/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj NDK_LIBS_OUT=C:\Users\TaoQi\Desktop\cocos_android\hello\test\build\jsb-link\frameworks\runtime-src\proj.android-studio\app\build\intermediates\ndkBuild\release\lib NDK_TOOLCHAIN_VERSION=4.9 NDK_MODULE_PATH=C:\CocosCreator\resources\cocos2d-x;C:\CocosCreator\resources\cocos2d-x\cocos;C:\CocosCreator\resources\cocos2d-x\external -j4 NDK_DEBUG=0 C:/Users/TaoQi/Desktop/cocos_android/hello/test/build/jsb-link/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj/local/armeabi-v7a/libcocos2djs.so
Started 193422121
Slave 2059579470 is ready
AAPT2 processed(2059579470) AndroidManifest.xml job:QueuedJob{
title=Compiling AndroidManifest.xml,
task={from=C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\manifests\aapt\release\AndroidManifest.xml, to=C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\res\compiled\release},
future=com.google.common.util.concurrent.SettableFuture@74054166}
AAPT1 err(Facade for 2059579470): error: invalid file path ‘C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\manifests\aapt\release\AndroidManifest.xml’. -> QueuedJob{
title=Compiling AndroidManifest.xml,
task={from=C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\manifests\aapt\release\AndroidManifest.xml, to=C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\res\compiled\release},
future=com.google.common.util.concurrent.SettableFuture@74054166}
AAPT warning(1867309708), Job(QueuedJob{
title=Compiling AndroidManifest.xml,
task={from=C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\manifests\aapt\release\AndroidManifest.xml, to=C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\res\compiled\release},
future=com.google.common.util.concurrent.SettableFuture@74054166}): error: invalid file path ‘C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\manifests\aapt\release\AndroidManifest.xml’.
AAPT1 err(Facade for 2059579470): Error -> QueuedJob{
title=Compiling AndroidManifest.xml,
task={from=C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\manifests\aapt\release\AndroidManifest.xml, to=C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\res\compiled\release},
future=com.google.common.util.concurrent.SettableFuture@74054166}
AAPT warning(1867309708), Job(QueuedJob{
title=Compiling AndroidManifest.xml,
task={from=C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\manifests\aapt\release\AndroidManifest.xml, to=C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\res\compiled\release},
future=com.google.common.util.concurrent.SettableFuture@74054166}): Error
AAPT1 err(Facade for 2059579470): Done -> QueuedJob{
title=Compiling AndroidManifest.xml,
task={from=C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\manifests\aapt\release\AndroidManifest.xml, to=C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\res\compiled\release},
future=com.google.common.util.concurrent.SettableFuture@74054166}
error: invalid file path ‘C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\manifests\aapt\release\AndroidManifest.xml’.

AAPT warning(1867309708), Job(QueuedJob{
title=Compiling AndroidManifest.xml,
task={from=C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\manifests\aapt\release\AndroidManifest.xml, to=C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\res\compiled\release},
future=com.google.common.util.concurrent.SettableFuture@74054166}): Done
Exception while processing job : QueuedJob{
title=Compiling AndroidManifest.xml,
task={from=C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\manifests\aapt\release\AndroidManifest.xml, to=C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\res\compiled\release},
future=com.google.common.util.concurrent.SettableFuture@74054166} : com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Process (2059579470) processed 1 files
Thread(queued-resource-processor_58): Process(2059579470), after shutdown queue_size=0
Started 919466209
Slave 193422121 is ready
Process (193422121) processed 0 files
Thread(queued-resource-processor_57): Process(193422121), after shutdown queue_size=0
Started 54400497
Slave 919466209 is ready
Process (919466209) processed 0 files
Thread(queued-resource-processor_59): Process(919466209), after shutdown queue_size=0
Successfully started process ‘command ‘C:\Users\TaoQi\AppData\Local\Android\Sdk\ndk-bundle\ndk-build.cmd’’
Slave 54400497 is ready
Process (54400497) processed 0 files
Thread(queued-resource-processor_60): Process(54400497), after shutdown queue_size=0
Shutdown finished in 262ms
:libcocos2dx:verifyReleaseResources FAILED
:libcocos2dx:verifyReleaseResources (Thread[Task worker for ‘:’ Thread 3,5,main]) completed. Took 0.421 secs.
:libcocos2dx:platformAttrExtractor (Thread[Task worker for ‘:’ Thread 2,5,main]) completed. Took 0.542 secs.
Android NDK: WARNING: APP_STL gnustl_static is deprecated and will be removed in the next release. Please switch to either c++_static or c++_shared. See https://developer.android.com/ndk/guides/cpp-support.html for more information.
Android NDK: WARNING: Deprecated NDK_TOOLCHAIN_VERSION value: 4.9. GCC is no longer supported and will be removed in the next release. See https://android.googlesource.com/platform/ndk/+/master/docs/ClangMigration.md.
[armeabi-v7a] Compile++ arm : cocos2djs_shared <= AppDelegate.cpp
[armeabi-v7a] Compile++ arm : cocos2djs_shared <= jsb_module_register.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= inspector_socket_server.cc
In file included from C:/CocosCreator/resources/cocos2d-x/cocos/scripting/js-bindings/jswrapper/v8/debugger/…/…/config.hpp:53:0,
from C:/CocosCreator/resources/cocos2d-x/cocos/scripting/js-bindings/jswrapper/v8/debugger/inspector_socket_server.h:4,
from C:/CocosCreator/resources/cocos2d-x/cocos/scripting/js-bindings/jswrapper/v8/debugger/inspector_socket_server.cc:1:
c:\users\taoqi\appdata\local\android\sdk\ndk-bundle\sysroot\usr\include\android\log.h:210:1: fatal error: opening dependency file C:/Users/TaoQi/Desktop/cocos_android/hello/test/build/jsb-link/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj/local/armeabi-v7a/objs/cocos2dx_static/scripting/js-bindings/jswrapper/v8/debugger/inspector_socket_server.o.d: No such file or directory
}
^
compilation terminated.
make: *** [C:/Users/TaoQi/Desktop/cocos_android/hello/test/build/jsb-link/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj/local/armeabi-v7a/objs/cocos2dx_static/scripting/js-bindings/jswrapper/v8/debugger/inspector_socket_server.o] Error 1
make: *** Waiting for unfinished jobs…
:hello_world:externalNativeBuildRelease FAILED
:hello_world:externalNativeBuildRelease (Thread[Daemon worker Thread 10,5,main]) completed. Took 11.777 secs.

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

  • What went wrong:
    Execution failed for task ‘:libcocos2dx:verifyReleaseResources’.

java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

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

2: Task failed with an exception.

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

Build command failed.
Error while executing process C:\Users\TaoQi\AppData\Local\Android\Sdk\ndk-bundle\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Users\TaoQi\Desktop\cocos_android\hello\test\build\jsb-link\frameworks\runtime-src\proj.android-studio\app\jni\Android.mk NDK_APPLICATION_MK=C:\Users\TaoQi\Desktop\cocos_android\hello\test\build\jsb-link\frameworks\runtime-src\proj.android-studio\app\jni\Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=0 APP_PLATFORM=android-16 NDK_OUT=C:/Users/TaoQi/Desktop/cocos_android/hello/test/build/jsb-link/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj NDK_LIBS_OUT=C:\Users\TaoQi\Desktop\cocos_android\hello\test\build\jsb-link\frameworks\runtime-src\proj.android-studio\app\build\intermediates\ndkBuild\release\lib NDK_TOOLCHAIN_VERSION=4.9 NDK_MODULE_PATH=C:\CocosCreator\resources\cocos2d-x;C:\CocosCreator\resources\cocos2d-x\cocos;C:\CocosCreator\resources\cocos2d-x\external -j4 NDK_DEBUG=0 C:/Users/TaoQi/Desktop/cocos_android/hello/test/build/jsb-link/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj/local/armeabi-v7a/libcocos2djs.so}
Android NDK: WARNING: APP_STL gnustl_static is deprecated and will be removed in the next release. Please switch to either c++_static or c++_shared. See https://developer.android.com/ndk/guides/cpp-support.html for more information.
Android NDK: WARNING: Deprecated NDK_TOOLCHAIN_VERSION value: 4.9. GCC is no longer supported and will be removed in the next release. See https://android.googlesource.com/platform/ndk/+/master/docs/ClangMigration.md.
[armeabi-v7a] Compile++ arm : cocos2djs_shared <= AppDelegate.cpp
[armeabi-v7a] Compile++ arm : cocos2djs_shared <= jsb_module_register.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= inspector_socket_server.cc
In file included from C:/CocosCreator/resources/cocos2d-x/cocos/scripting/js-bindings/jswrapper/v8/debugger/…/…/config.hpp:53:0,
from C:/CocosCreator/resources/cocos2d-x/cocos/scripting/js-bindings/jswrapper/v8/debugger/inspector_socket_server.h:4,
from C:/CocosCreator/resources/cocos2d-x/cocos/scripting/js-bindings/jswrapper/v8/debugger/inspector_socket_server.cc:1:
c:\users\taoqi\appdata\local\android\sdk\ndk-bundle\sysroot\usr\include\android\log.h:210:1: fatal error: opening dependency file C:/Users/TaoQi/Desktop/cocos_android/hello/test/build/jsb-link/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj/local/armeabi-v7a/objs/cocos2dx_static/scripting/js-bindings/jswrapper/v8/debugger/inspector_socket_server.o.d: No such file or directory
}
^
compilation terminated.
make: *** [C:/Users/TaoQi/Desktop/cocos_android/hello/test/build/jsb-link/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj/local/armeabi-v7a/objs/cocos2dx_static/scripting/js-bindings/jswrapper/v8/debugger/inspector_socket_server.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.
    ==============================================================================

  • Get more help at https://help.gradle.org

BUILD FAILED in 14s
38 actionable tasks: 7 executed, 31 up-to-date
执行命令出错,返回值:1。

在论坛上面搜过类似的,但是没有解决方案。各位大佬有遇到这个问题吗?

1赞

上面是编译的失败的界面

native.rar (7.1 KB)
这是编译的日志

自己顶一下,撑住,别沉了:joy:

现在换成creator2.0.1了,编译的日志变了一下:

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

Build command failed.
Error while executing process C:\Users\TaoQi\AppData\Local\Android\Sdk\ndk-bundle\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Users\TaoQi\Desktop\cocos_android\hello\test\build\jsb-link\frameworks\runtime-src\proj.android-studio\app\jni\Android.mk NDK_APPLICATION_MK=C:\Users\TaoQi\Desktop\cocos_android\hello\test\build\jsb-link\frameworks\runtime-src\proj.android-studio\app\jni\Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=0 APP_PLATFORM=android-16 NDK_OUT=C:/Users/TaoQi/Desktop/cocos_android/hello/test/build/jsb-link/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj NDK_LIBS_OUT=C:\Users\TaoQi\Desktop\cocos_android\hello\test\build\jsb-link\frameworks\runtime-src\proj.android-studio\app\build\intermediates\ndkBuild\release\lib NDK_TOOLCHAIN_VERSION=4.9 NDK_MODULE_PATH=C:\CocosCreator\resources\cocos2d-x;C:\CocosCreator\resources\cocos2d-x\cocos;C:\CocosCreator\resources\cocos2d-x\external -j4 NDK_DEBUG=0 C:/Users/TaoQi/Desktop/cocos_android/hello/test/build/jsb-link/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj/local/armeabi-v7a/libcocos2djs.so}
Android NDK: WARNING: APP_STL gnustl_static is deprecated and will be removed in the next release. Please switch to either c++_static or c++_shared. See https://developer.android.com/ndk/guides/cpp-support.html for more information.
Android NDK: WARNING: Deprecated NDK_TOOLCHAIN_VERSION value: 4.9. GCC is no longer supported and will be removed in the next release. See https://android.googlesource.com/platform/ndk/+/master/docs/ClangMigration.md.
[armeabi-v7a] Compile++ thumb: audioengine_static <= mp3reader.cpp
[armeabi-v7a] Compile++ thumb: audioengine_static <= tinysndfile.cpp
[armeabi-v7a] Compile++ arm : cocos2djs_shared <= main.cpp
[armeabi-v7a] Compile++ arm : cocos2djs_shared <= AppDelegate.cpp
[armeabi-v7a] Compile++ arm : cocos2djs_shared <= jsb_module_register.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= cocos2d.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= CCFileUtils.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= CCImage.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= CCSAXParser.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= MathUtil.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= CCGeometry.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= CCVertex.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= Mat4.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= Quaternion.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= Vec2.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= Vec3.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= Vec4.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= CCAutoreleasePool.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= CCConfiguration.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= CCData.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= CCRef.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= CCValue.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= CCThreadPool.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= TGAlib.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= ZipUtils.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= base64.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= ccCArray.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= ccRandom.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= ccTypes.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= ccUTF8.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= ccUtils.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= etc1.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= pvr.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= CCLog.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= CCScheduler.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= csscolorparser.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= CCGLUtils.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= CCRenderTexture.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= Types.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= DeviceGraphics.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= FrameBuffer.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= GFX.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= GFXUtils.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= GraphicsHandle.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= IndexBuffer.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= Program.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= RenderBuffer.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= RenderTarget.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= State.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= Texture.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= Texture2D.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= VertexBuffer.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= VertexFormat.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= BaseRenderer.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= Camera.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= Config.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= Effect.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= InputAssembler.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= Light.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= Model.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= Pass.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= ProgramLib.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= Scene.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= Technique.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= View.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= ForwardRenderer.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= LocalStorage-android.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= jsb_gfx_auto.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= jsb_cocos2dx_network_auto.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= jsb_renderer_auto.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= jsb_cocos2dx_auto.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= jsb_cocos2dx_audioengine_auto.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= jsb_cocos2dx_extension_auto.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= JavaScriptJavaBridge.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= jsb_opengl_manual.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= jsb_opengl_utils.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= jsb_classtype.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= jsb_conversions.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= jsb_cocos2dx_manual.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= jsb_cocos2dx_network_manual.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= jsb_gfx_manual.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= jsb_global.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= jsb_renderer_manual.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= jsb_socketio.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= jsb_websocket.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= jsb_xmlhttprequest.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= jsb_platform_android.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= config.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= HandleObject.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= MappingUtils.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= RefCounter.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= Value.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= State.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= Class.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= Object.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= ObjectWrap.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= ScriptEngine.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= Utils.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= SHA1.cpp
[armeabi-v7a] Compile++ arm : cocos2dx_static <= util.cc
[armeabi-v7a] Compile++ arm : cocos2dx_static <= env.cc
[armeabi-v7a] Compile++ arm : cocos2dx_static <= inspector_agent.cc
[armeabi-v7a] Compile++ arm : cocos2dx_static <= inspector_io.cc
[armeabi-v7a] Compile++ arm : cocos2dx_static <= inspector_socket.cc
[armeabi-v7a] Compile++ arm : cocos2dx_static <= inspector_socket_server.cc
[armeabi-v7a] Compile++ arm : cocos2dx_static <= node.cc
In file included from C:/CocosCreator/resources/cocos2d-x/cocos/scripting/js-bindings/jswrapper/v8/debugger/…/…/config.hpp:53:0,
from C:/CocosCreator/resources/cocos2d-x/cocos/scripting/js-bindings/jswrapper/v8/debugger/inspector_socket_server.h:4,
from C:/CocosCreator/resources/cocos2d-x/cocos/scripting/js-bindings/jswrapper/v8/debugger/inspector_socket_server.cc:1:
c:\users\taoqi\appdata\local\android\sdk\ndk-bundle\sysroot\usr\include\android\log.h:210:1: fatal error: opening dependency file C:/Users/TaoQi/Desktop/cocos_android/hello/test/build/jsb-link/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj/local/armeabi-v7a/objs/cocos2dx_static/scripting/js-bindings/jswrapper/v8/debugger/inspector_socket_server.o.d: No such file or directory
}
^
compilation terminated.
make: *** [C:/Users/TaoQi/Desktop/cocos_android/hello/test/build/jsb-link/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj/local/armeabi-v7a/objs/cocos2dx_static/scripting/js-bindings/jswrapper/v8/debugger/inspector_socket_server.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.

  • Get more help at https://help.gradle.org

45 actionable tasks: 45 executed
BUILD FAILED in 1m 10s
执行命令出错,返回值:1。

更新一下sdk换换ndk版本试试

谢谢。
问题找到了,python2.7没有安装,我也重装了一下Cocos creator。

你重新安装了1一下Cocos就好了吗

工程路径太深,建议放磁盘根目录,不用放桌面

1赞

我下载安装了python还是报错,你是怎么解决的啊?

我也是遇到这种问题
Trying to start D:\sdk\android-sdk-windows\build-tools\27.0.3\aapt2.exe
Trying to start D:\sdk\android-sdk-windows\build-tools\27.0.3\aapt2.exe
Trying to start D:\sdk\android-sdk-windows\build-tools\27.0.3\aapt2.exe
Trying to start D:\sdk\android-sdk-windows\build-tools\27.0.3\aapt2.exe
Trying to start D:\sdk\android-sdk-windows\build-tools\27.0.3\aapt2.exe
Trying to start D:\sdk\android-sdk-windows\build-tools\27.0.3\aapt2.exe
Trying to start D:\sdk\android-sdk-windows\build-tools\27.0.3\aapt2.exe
Trying to start D:\sdk\android-sdk-windows\build-tools\27.0.3\aapt2.exe
Started 1215816310
Started 64264418
Started 1063293393
Started 2034376222
Started 997376836
Slave 1215816310 is ready
Slave 64264418 is ready
Started 1920748394
AAPT2 processed(64264418) values-zh-rCN.xml job:QueuedJob{
title=Compiling values-zh-rCN.xml,
task={from=C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\res\merged\release\values-zh-rCN\values-zh-rCN.xml, to=C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\res\compiled\release},
future=com.google.common.util.concurrent.SettableFuture@d1376e8}
AAPT2 processed(1215816310) values.xml job:QueuedJob{
title=Compiling values.xml,
task={from=C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\res\merged\release\values\values.xml, to=C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\res\compiled\release},
future=com.google.common.util.concurrent.SettableFuture@71b1fd9}
AAPT1 err(Facade for 64264418): Done -> QueuedJob{
title=Compiling values-zh-rCN.xml,
task={from=C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\res\merged\release\values-zh-rCN\values-zh-rCN.xml, to=C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\res\compiled\release},
future=com.google.common.util.concurrent.SettableFuture@d1376e8}
AAPT1 err(Facade for 1215816310): Done -> QueuedJob{
title=Compiling values.xml,
task={from=C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\res\merged\release\values\values.xml, to=C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\res\compiled\release},
future=com.google.common.util.concurrent.SettableFuture@71b1fd9}
Started 457064959
Slave 1063293393 is ready
AAPT warning(1233116604), Job(QueuedJob{
title=Compiling values.xml,
task={from=C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\res\merged\release\values\values.xml, to=C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\res\compiled\release},
future=com.google.common.util.concurrent.SettableFuture@71b1fd9}): Done
AAPT warning(2144685817), Job(QueuedJob{
title=Compiling values-zh-rCN.xml,
task={from=C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\res\merged\release\values-zh-rCN\values-zh-rCN.xml, to=C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\intermediates\res\compiled\release},
future=com.google.common.util.concurrent.SettableFuture@d1376e8}): Done
Started 1079899395
Slave 2034376222 is ready
AAPT2 processed(1063293393) linking job:QueuedJob{
title=Linking,
task={config=com.android.builder.internal.aapt.AaptPackageConfig@3b336f8d},
future=com.google.common.util.concurrent.SettableFuture@4c4dbf00}
Slave 997376836 is ready
Slave 1920748394 is ready
Slave 457064959 is ready
Slave 1079899395 is ready
AAPT1 err(Facade for 1063293393): W/ResourceType( 4492): For resource 0x0101053d, entry index(1341) is beyond type entryCount(1238) -> QueuedJob{
title=Linking,
task={config=com.android.builder.internal.aapt.AaptPackageConfig@3b336f8d},
future=com.google.common.util.concurrent.SettableFuture@4c4dbf00}
求解

我也是同样问题,在论坛上找了很多解决方案,全试过,还是报错无法解决。
环境变量,sdk 和ndk都换过 ,路径也改过。。
希望官方能给个环境搭建版本对照表。什么样版本与什么版本的sdk与ndk.
现在只能放弃封包app。希望日后能有个一件集成安装。

2019-7-7
cocos creator 版本 2.0.9 ,编译android 提示 ,使用的 ndk 版本 14b,16b 都出现如下错误
inspector_socket_server.o.d’: No such file or directory

改成 18b 就好了

so ,just change your ndk version , 2.0.9 == ndk 18b is ok

1赞

该主题在最后一个回复创建后14天后自动关闭。不再允许新的回复。