编译项目时,报错误
Error:A problem occurred configuring project ':lianxidemo'.
> android-apt plugin is incompatible with the Android Gradle plugin. Please use 'annotationProcessor' configuration instead.
原因
Android studio3.0以后,Gradle和原来项目里使用的是android-apt生成编译时注解的方式不兼容。
解决方法
把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。