新手求教:
cpp-empty-test整个项目都使用默认设置来进行编译,debug成功,release死活都过不去。另外,构建静态库也同样是这个问题,debug版本的静态库没有问题,release也失败,均是同一错误。
Task :libcocos2dx:verifyReleaseResources FAILED
Putting task artifact state for task ‘:libcocos2dx:verifyReleaseResources’ into context took 0.0 secs.
Up-to-date check for task ‘:libcocos2dx:verifyReleaseResources’ took 0.004 secs.
It is not up-to-date because:
Task has failed previously.
All input files are considered out-of-date for incremental task ‘:libcocos2dx:verifyReleaseResources’.
Unable do incremental execution: full task run Aapt2QueuedResourceProcessor is using D:\Android\Sdk\build-tools\27.0.3\aapt2.exe
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:libcocos2dx:verifyReleaseResources’.
com.android.ide.common.process.ProcessException: Failed to execute aapt
-
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
系统是win7 x64,其它各项版本为jdk 8u172,android studio 3.1.2,ndk r17,gradle 4.4,compileSdkVersion=27,minSdkVersion=14,targetSdkVersion=27,buildToolsVersion=27.0.3,gradle plugin 3.1.2
之前各版本均使用推荐设置,jdk r16 / as 3.1 / gradle plugin 3.0.0 / gradle 4.1等,debug无问题,release无法成功。
构建静态库使用命令行:cocos gen-libs -c -p android -m release,官网提示-m缺省默认为release,我这里测试为debug,添加版本后,执行出错,错误与上面提示信息一致。
上面错误信息提示之前版本失败,这里我是直接下载官网3.17版本的zip包后解压,然后配置好环境变量后,就直接进入cocos2d-x目录编译cpp-empty-test的android版本时失败。