解决Studio3.0 Dagger2注入Error:android-apt plugin不兼容的问题
2017-11-09 11:07
507 查看
今天在导入Google官方推荐Dagger2注入框架时出现一个错误:
Error:android-apt plugin is incompatible with the Android Gradle plugin. Please use 'annotationProcessor' configuration instead.
经过查找发现,在Studio升级到3.0之后原来的配置方式apt与最新版本Gradle已经不兼容,推荐使用annotationProcessor,最终的解决办法是:
一、把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即可。
Error:android-apt plugin is incompatible with the Android Gradle plugin. Please use 'annotationProcessor' configuration instead.
经过查找发现,在Studio升级到3.0之后原来的配置方式apt与最新版本Gradle已经不兼容,推荐使用annotationProcessor,最终的解决办法是:
一、把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即可。
相关文章推荐
- 解决Studio3.0 Dagger2注入Error:android-apt plugin不兼容的问题
- 解决Error:android-apt plugin is incompatible with the Android Gradle plugin问题
- Android-Android studio 出现 Error: NDK integration is deprecated in the current plugin. 问题解决
- Android-Android studio 出现 Error: NDK integration is deprecated in the current plugin. 问题解决
- Android-Android studio 出现 Error: NDK integration is deprecated in the current plugin. 问题解决
- Android-Android studio 出现 Error: NDK integration is deprecated in the current plugin. 问题解决
- Android-Android studio 出现 Error: NDK integration is deprecated in the current plugin. 问题解决
- 解决下载Android源码时遇到的问题 DownloadError: android.googlesource.com:
- Android ADT+eclipse安装及兼容问题解决方案(不太准确)
- Android out of memory 彻底解决Android因加载多个大图引起的OutOfMemoryError,内存溢出的问题
- android关于The connection to adb is down, and a severe error has occured.这个问题的解决办法
- ERROR/AndroidRuntime(17121)的问题解决
- android关于The connection to adb is down, and a severe error has occured.这个问题的解决办法
- android 关于Make sure the plugin is properly configured问题的解决办法
- 彻底解决Android因加载多个大图引起的OutOfMemoryError,内存溢出的问题
- 解决Ubuntu sudo apt-get install遇到的E: Sub-process /usr/bin/dpkg returned an error code (1)问题
- 【android】解决因为图片太大引起的内存不足问题,Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
- android解决坚屏拍照和保存图片旋转90度的问题,并兼容4.0
- Error: ShouldNotReachHere() android工程类中main方法运行出错问题解决
- Android 问题解决:Android中 Error generating final archive: Debug Certificate expired 的错误