编译项目时,报错误
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。
本文介绍了解决在Android Studio中遇到的与android-apt插件不兼容的问题,该问题出现在尝试编译项目时,特别是在使用Android Gradle插件的环境中。文章提供了详细的步骤来替换过时的配置,并确保项目的顺利构建。
355

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



