升级到Android Studio3.0 RC 2,使用gradle报错信息如下:Error:failed linking file resources.
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 ':app:processDebugResources'.
> Failed to execute aapt
Information:BUILD FAILED in 27s
Information:11 errors
Information:0 warnings
解决方法
Android的Gradle 3.0插件默认启动Aapt2,目的是为了改进增量资源的处理。
如果有问题可以退回到之前的版本,打开gradle.properties,添加如下内容android.enableAapt2=false
参考:https://developer.android.com/studio/build/gradle-plugin-3-0-0.html