使用apt導入時報警告:Warning:Using incompatible plugins for the annotation processing: android-apt. This may result in an unexpected behavior.


使用apt來導入butterknife和dagger的時候,會報警告   (在引用databinding的時候會報,其他不會)
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了

原文:https://stackoverflow.com/questions/42632662/android-studio-warning-using-incompatible-plugins-for-the-annotation-processing
最下面的回答就是這三步。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM