打包apk错误为什么我不行?

ndk

[== “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 “D:/CGAME/VirtualWorld/proj.android/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/CMakeOutput.log”.”,“type”:“message”}

]== “CMake Server” ==]

Configuring incomplete, errors occurred!
See also “D:/CGAME/VirtualWorld/proj.android/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/CMakeOutput.log”.
Configuring incomplete, errors occurred!
See also “D:/CGAME/VirtualWorld/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

:VirtualWorld:generateJsonModelDebug (Thread[Task worker for ‘:’,5,main]) completed. Took 1.72 secs.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:VirtualWorld: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

你好你找到合适的解决方案了么?

你好,解决了
简单来说有几步
1,配置好cocos2d-x的steup.py里面的环境变量,这部分网上很多教程
2,配置java环境变量
3,我就是这里出错了,原因如下
导致这个问题是在一个项目中需要使用到一个三方库,由于这个库的功能不能完全满足我的需求,于是就很自然的 fork 了一份下来自己进行修改,而该库中核心代码都是由 C 写的,因此就用到了 CMake
但是,可能因为是版本更新之类原因导致CMake少集成了一个工具!
Ninjia
百度下载并配置好Ninjia 的环境变量后这坑是过了
但是还没完…也就有了第四步
4, 编辑项目下的 CMakeLists.txt 文本文件,把你所有的.cpp .h放进去就ok,网上过时的教程都是说放Android.mk是不需要的
我用的版本是 3.17.2

1赞

有用,感谢,感觉cocos2d-x各种不友好,这样一比确实cocos creator对新手友好多了。