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。
本文介绍了解决Android Studio 3.0中使用android-apt插件与Gradle插件不兼容的问题。通过删除旧插件配置并替换为新的annotationProcessor配置,实现了项目的顺利编译。
9710

被折叠的 条评论
为什么被折叠?



