升级Android Studio3.0 Error:A problem occurred configuring project ':app'. > android-apt plugin is inc

来源:互联网 发布:md5解密java代码 32位 编辑:程序博客网 时间:2024/06/06 07:07
Error:A problem occurred configuring project ':app'.> android-apt plugin is incompatible with the Android Gradle plugin.  Please use 'annotationProcessor' configuration instead.

原因
原来项目里使用的是android-apt生成编译时注解的方式,但是我使用的是Android studio3.0,Gradle已经和这个不兼容了。
解决方法
把Project的build.gradle的
classpath‘com.neenbedankt.gradle.plugins:android-apt:1.8’删除
再把app的build.gradle的
apply plugin: ‘com.neenbedankt.android-apt’删除
然后把dependencies中原来使用apt的改为annotationProcessor
重新sync Project。

阅读全文
0 0