android-apt plugin is incompatible with the Android Gradle plugin. Please use 'annotationProcessor'
来源:互联网 发布:周琦和姚明cba数据 编辑:程序博客网 时间:2024/06/05 14:20
根据网络的解决方法是:
一、把project目录下的build.gradle中的classpath ‘com.neenbedankt.gradle.plugins:android-apt:1.8'删除掉;
二、把具体Module目录下的build.gradle中的apply plugin: ‘com.neenbedankt.android-apt’删除;
三、同时把dependencies中原来使用apt的改为annotationProcessor,然后Sync Now即可。
我在外部的build.gradle中的classpath'com.neenbedankt.gradle.plugins:android-apt:1.8'注释了,但是在内部build.gradle找不到apply plugin: ‘com.neenbedankt.android-apt’,同样dependencies中也没有apt
解决方法是:
在内部的build.gradle的顶部删除 applyplugin:'android-apt'会出来一个更新 点击更新,外部的classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'都不用修改 ,就完成了。
弄完了之后还是 报错
Error:Execution failed for task ':app:javaPreCompileDebug'.
> Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor. Please add them to the annotationProcessor configuration.
- butterknife-compiler-8.6.0.jar (com.jakewharton:butterknife-compiler:8.6.0)
Alternatively, set android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true to continue with previous behavior. Note that this option is deprecated and will be removed in the future.
See https://developer.android.com/r/tools/annotation-processor-error-message.html for more details.
解决办法:
android{
defaultConfig{
....
...
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspathtrue
}
}
}
OK大功告成
- android-apt plugin is incompatible with the Android Gradle plugin. Please use 'annotationProcessor'
- Android开发:Error:android-apt plugin is incompatible with the Android Gradle plugin. Please use 'anno
- Error:android-apt plugin is incompatible with the Android Gradle plugin. Please use 'annotationProc
- Error:android-apt plugin is incompatible with the Android Gradle plugin. Please use 'annotationProc
- Warning:android-apt plugin is incompatible with future version of Android Gradle plugin. Please use
- android-apt plugin is incompatible with future version of Android Gradle plugin. use 'annotationPro
- Android studio更新后项目报错Error:android-apt plugin is incompatible with the Android Gradle plugin. Pleas
- android Error running app: This version of Android Studio is incompatible with the Gradle Plugin use
- 解决Warning:android-apt plugin is incompatible with future version of Android Gradle plugin.
- Warning:android-apt plugin is incompatible with future version of Android Gradle plugin
- Android Studio Build Error : This version of Android Studio is incompatible with the Gradle Plugin u
- Android 解决Error running app: This version of Android Studio is incompatible with the Gradle Plugin
- Android Studio Build Error : This version of Android Studio is incompatible with the Gradle Plugin u
- Error running example: This version of Android Studio is incompatible with the Gradle Plugin used.解决
- This version of Android Studio is incompatible with the Gradle Plugin used
- Error running app: This version of Android Studio is incompatible with the Gradle Plugin used. Try
- Error running app: This version of Android Studio is incompatible with the Gradle Plugin used.
- This version of Android Studio is incompatible with the Gradle Plugin used.
- [转]霍夫曼编码(Huffman Coding)
- python 机器学习 支持向量机 线性可分
- 数学分析 反函数存在性定理,连续性定理与求导定理
- sql 树形 子节点获取最顶级的节点
- 一只程序猿的养成日记 第一章 第四节 逻辑运算符的应用
- android-apt plugin is incompatible with the Android Gradle plugin. Please use 'annotationProcessor'
- 点击按钮连续滚动【适用于广告栏等】
- LeetCode--First Missing Positive (第一个丢失的正整数)Python
- CORS通信
- 漫反射着色
- fridge11_27
- [codeplus 11月月赛]T1 jogging
- malloc与realloc的区别
- Servlet中forward和redirect的区别