Android studio更新后项目报错Error:android-apt plugin is incompatible with the Android Gradle plugin. Pleas

来源:互联网 发布:京东商城java笔试题 编辑:程序博客网 时间:2024/06/05 23:56

主要原因是AS更新后对apt插件不再支持

1.build.gradle文件中的“apt”的地方把“apt”改为“annotationProcessor”;

2.用到apt的apply pulgin删除 例如:apply pulgin:'android-apt'这行

然后 clean一下

此时 “:android-apt plugin is incompatible with the Android Gradle plugin” 的提示应该已经消失


如果出现下列错误:

Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

 在gradle.properties文件中加入:

android.enableAapt2=false(注意gradle.properties文件最后行有"\",如果该代码加在最后一行,"\"要下移带该代码后)



阅读全文
0 0
原创粉丝点击