100字范文,内容丰富有趣,生活中的好帮手!
100字范文 > Android studio更新后项目报错Error:android-apt plugin is incompatible with the Android Gradle plugin. Pleas

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

时间:2020-11-20 17:48:15

相关推荐

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

主要原因是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文件最后行有"\",如果该代码加在最后一行,"\"要下移带该代码后)

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。