升级Android studio 3.0之后踩过的坑

写静态代理模式在 main方法进行测试的时候所报的错误:

Information:Gradle: Executing tasks: [:proxymodel:assembleDebug]
Information:Gradle: BUILD FAILED in 11s
Information:Kotlin: Kotlin JPS plugin is disabled
Information:2017/12/14 16:38 - Compilation completed with 5 errors and 0 warnings in 16s 209ms
Error:Gradle: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:Gradle: failed to create directory 'E:\AndroidStudioProjects\PlayVideo\proxymodel\build\generated\source\r\debug\gf\yyj\proxymodel'.
Error:Gradle: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:Gradle: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:Gradle: Execution failed for task ':proxymodel:processDebugResources'.
> Failed to execute aapt

kotlin的JPS插件被禁止使用, aapt2 错误
解决方法:
在项目gradle.properties文件中添加: android.enableAapt2=false

你可能感兴趣的:(笔记)