使用cocos2dx 编译android游戏客户端时,使用android studio 3.0以上就会出现如下错误
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Information:Gradle tasks [:libcocos2dx:generateDebugSources, :libcocos2dx:generateDebugAndroidTestSources, :libcocos2dx:mockableAndroidJar, :hello_world:generateDebugSources, :hello_world:generateDebugAndroidTestSources, :hello_world:mockableAndroidJar] Error:failed to create directory 'D:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\generated\source\r\androidTest\debug\org\cocos2dx\lib\test'. Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details Error:Execution failed for task ':libcocos2dx:processDebugAndroidTestResources'. > Failed to execute aapt Information:BUILD FAILED in 2s Information:5 errors Information:0 warnings Information:See complete output in console
解决办法: