Cause: android-apt plugin is incompatible with the Android(安卓)Gradle plugin.
16lz
2022-01-11
Android 升级到3.4.1后,原来的项目无法通过编译了,让我们看看出现的问题:
Cause: android-apt plugin is incompatible with the Android Gradle plugin.
Please use ‘annotationProcessor’ configuration instead.
该问题发生在module级的build.gradle文件里,一般发生在你的application模块。
最新版Android Studio所搭配的com.android.tools.build:gradle:3.4.1及更高版本不支持目前1.8版本的apt了,所以先把project的build.gradle中
classpath ‘com.neenbedankt.gradle.plugins:android-apt:1.8’
删掉。然后把module的build.gradle中的
apply plugin: ‘com.neenbedankt.android-apt’
也删掉。再把之前dependencies中类似于
apt ‘com.jakewharton:butterknife-compiler:8.8.1’
apt ‘com.jakewharton:butterknife-compiler:8.8.1’
中的apt换成annotationProcessor,然后Sync,问题解决。
更多相关文章
- android“设置”里的版本号
- 安卓视频通讯与监控系统完全版本正式发布
- Android(安卓)软键盘遮挡问题
- Eclipse调试Android出现Debug certificate expired问题的解决
- Android(安卓)SDK 与API版本对应关系
- Android编译问题:Only 64-bit build environments are supported
- Android(安卓)SDK无法更新问题解决
- Android在TextView中设置图片显示问题
- Android(安卓)Linux Socket 数据传输错误