使用apt來導入butterknife和dagger的時候,會報警告 Warning:Using incompatible plugins for the annotation processing: android-apt. This may result in an unexpected behavior. 解決方案:
1、apt 'com.jakewharton:butterknife-compiler:8.2.0' 改爲=》annotationProcessor 'com.jakewharton:butterknife-compiler:8.2.0'
2、刪除:project build.gradle 中的
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' 添加apt的操作 3、刪除 app build.gradle 中的:
apply plugin: 'com.neenbedankt.android-apt' 以上三步完成後同步就ok了