我正在尝试构建cocos2d-x android应用程序。我点击了以下链接:
https://docs.cocos2d-x.org/cocos2d-x/en/editors_and_tools/cocosCLTool.html
https://docs.cocos2d-x.org/cocos2d-x/en/installation/Android-Studio.html
环境:
操作系统-Windows 10 _________ cocos2d-x版本-3.17.1
> Task :CGame:generateJsonModelDebug FAILED
Task ':CGame:generateJsonModelDebug' is not up-to-date because:
Task has failed previously.
External native generate JSON debug: starting JSON generation
External native generate JSON debug: using platform version 16 for ABI ARMEABI_V7A and min SDK version 16
External native generate JSON debug: rebuilding JSON C:\Users\WhiteSun\AndroidStudioProjects\CGame\proj.android\app\.externalNativeBuild\cmake\debug\armeabi-v7a\android_gradle_build.json due to:
External native generate JSON debug: - expected json C:\Users\WhiteSun\AndroidStudioProjects\CGame\proj.android\app\.externalNativeBuild\cmake\debug\armeabi-v7a\android_gradle_build.json file is not present, will remove stale json folder
External native generate JSON debug: - missing previous command file C:\Users\WhiteSun\AndroidStudioProjects\CGame\proj.android\app\.externalNativeBuild\cmake\debug\armeabi-v7a\cmake_build_command.txt, will remove stale json folder
External native generate JSON debug: removing stale contents from 'C:\Users\WhiteSun\AndroidStudioProjects\CGame\proj.android\app\.externalNativeBuild\cmake\debug\armeabi-v7a'
External native generate JSON debug: created folder 'C:\Users\WhiteSun\AndroidStudioProjects\CGame\proj.android\app\.externalNativeBuild\cmake\debug\armeabi-v7a'
External native generate JSON debug: executing cmake Executable : C:\AndroidSdk\cmake\3.10.2.4988404\bin\cmake.exe
arguments :
-HC:\Users\WhiteSun\AndroidStudioProjects\CGame
-BC:\Users\WhiteSun\AndroidStudioProjects\CGame\proj.android\app\.externalNativeBuild\cmake\debug\armeabi-v7a
-DANDROID_ABI=armeabi-v7a
-DANDROID_PLATFORM=android-16
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\WhiteSun\AndroidStudioProjects\CGame\proj.android\app\build\intermediates\cmake\debug\obj\armeabi-v7a
-DCMAKE_BUILD_TYPE=Debug
-DANDROID_NDK=C:\AndroidSdk\ndk-bundle
-DCMAKE_CXX_FLAGS=-frtti -fexceptions -fsigned-char
-DCMAKE_SYSTEM_NAME=Android
-DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a
-DCMAKE_SYSTEM_VERSION=16
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DCMAKE_ANDROID_NDK=C:\AndroidSdk\ndk-bundle
-DCMAKE_TOOLCHAIN_FILE=C:\AndroidSdk\ndk-bundle\build\cmake\android.toolchain.cmake
-G Ninja
-DCMAKE_FIND_ROOT_PATH=
-DANDROID_STL=c++_static
-DANDROID_TOOLCHAIN=clang
-DANDROID_ARM_NEON=TRUE
jvmArgs :
[== "CMake Server" ==[
{"supportedProtocolVersions":[{"isExperimental":true,"major":1,"minor":1}],"type":"hello"}
]== "CMake Server" ==]
[== "CMake Server" ==[
{
"type": "handshake",
"cookie": "gradle-cmake-cookie",
"protocolVersion": {
"isExperimental": true,
"major": 1,
"minor": 1
},
"sourceDirectory": "C:/Users/WhiteSun/AndroidStudioProjects/CGame",
"buildDirectory": "C:/Users/WhiteSun/AndroidStudioProjects/CGame/proj.android/app/.externalNativeBuild/cmake/debug/armeabi-v7a",
"generator": "Ninja"
}
]== "CMake Server" ==]
[== "CMake Server" ==[
{"cookie":"gradle-cmake-cookie","inReplyTo":"handshake","type":"reply"}
]== "CMake Server" ==]
[== "CMake Server" ==[
{
"type": "configure",
"cacheArguments": [
"",
"-DANDROID_ABI\u003darmeabi-v7a",
"-DANDROID_PLATFORM\u003dandroid-16",
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY\u003dC:\\Users\\WhiteSun\\AndroidStudioProjects\\CGame\\proj.android\\app\\build\\intermediates\\cmake\\debug\\obj\\armeabi-v7a",
"-DCMAKE_BUILD_TYPE\u003dDebug",
"-DANDROID_NDK\u003dC:\\AndroidSdk\\ndk-bundle",
"-DCMAKE_CXX_FLAGS\u003d-frtti -fexceptions -fsigned-char",
"-DCMAKE_SYSTEM_NAME\u003dAndroid",
"-DCMAKE_ANDROID_ARCH_ABI\u003darmeabi-v7a",
"-DCMAKE_SYSTEM_VERSION\u003d16",
"-DCMAKE_EXPORT_COMPILE_COMMANDS\u003dON",
"-DCMAKE_ANDROID_NDK\u003dC:\\AndroidSdk\\ndk-bundle",
"-DCMAKE_TOOLCHAIN_FILE\u003dC:\\AndroidSdk\\ndk-bundle\\build\\cmake\\android.toolchain.cmake",
"-G Ninja",
"-DCMAKE_FIND_ROOT_PATH\u003d",
"-DANDROID_STL\u003dc++_static",
"-DANDROID_TOOLCHAIN\u003dclang",
"-DANDROID_ARM_NEON\u003dTRUE"
]
}
]== "CMake Server" ==]
[== "CMake Server" ==[
{"cookie":"","inReplyTo":"configure","message":"CMake Error: CMake was unable to find a build program corresponding to \"Ninja\". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.","title":"Error","type":"message"}
]== "CMake Server" ==]
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
[== "CMake Server" ==[
{"cookie":"","inReplyTo":"configure","progressCurrent":1000,"progressMaximum":1000,"progressMessage":"Configuring","progressMinimum":0,"type":"progress"}
]== "CMake Server" ==]
[== "CMake Server" ==[
{"cookie":"","inReplyTo":"configure","message":"Configuring incomplete, errors occurred!\nSee also \"C:/Users/WhiteSun/AndroidStudioProjects/CGame/proj.android/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/CMakeOutput.log\".","type":"message"}
]== "CMake Server" ==]
Configuring incomplete, errors occurred!
See also "C:/Users/WhiteSun/AndroidStudioProjects/CGame/proj.android/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/CMakeOutput.log".
Configuring incomplete, errors occurred!
See also "C:/Users/WhiteSun/AndroidStudioProjects/CGame/proj.android/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/CMakeOutput.log".
[== "CMake Server" ==[
{"cookie":"","errorMessage":"Configuration failed.","inReplyTo":"configure","type":"error"}
]== "CMake Server" ==]
Configuration failed.
External native generate JSON debug: JSON generation completed with problems
:CGame:generateJsonModelDebug (Thread[Daemon worker,5,main]) completed. Took 0.299 secs.
> Task :libcocos2dx:extractDebugAnnotations UP-TO-DATE
file or directory 'C:\Users\WhiteSun\AndroidStudioProjects\CGame\cocos2d\cocos\platform\android\libcocos2dx\src\main\java', not found
file or directory 'C:\Users\WhiteSun\AndroidStudioProjects\CGame\cocos2d\cocos\platform\android\libcocos2dx\src\main\java', not found
file or directory 'C:\Users\WhiteSun\AndroidStudioProjects\CGame\cocos2d\cocos\platform\android\libcocos2dx\src\debug\java', not found
Skipping task ':libcocos2dx:extractDebugAnnotations' as it is up-to-date.
:libcocos2dx:extractDebugAnnotations (Thread[Task worker for ':' Thread 5,5,main]) completed. Took 0.184 secs.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':CGame:generateJsonModelDebug'.
> com.android.ide.common.process.ProcessException: Error configuring
* 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.org
BUILD FAILED in 26s
34 actionable tasks: 1 executed, 33 up-to-date
VCS Checkout Cache (C:\Users\WhiteSun\AndroidStudioProjects\CGame\proj.android\.gradle\vcsWorkingDirs) has not been cleaned up in 0 days
Error running command, return code: 1.
我尝试更新各种文件。我在这里做什么错了?