android-apt plugin is incompatible with the android gradle plugin

Android Gradle 2.3開始停止維護android-apt

現在需要使用annotationProcessor

主要在gradle內做三種替換即可
compile 改成 implementation,
apt 改成 annotationProcessor
testCompile 改成 androidTestImplementation

然後再把apply plugin: 'android-apt'移除即可

 

可參考https://majing.io/posts/10000003001155

 

1. 錯誤如下圖

01.png  

arrow
arrow
    文章標籤
    Android android-apt error
    全站熱搜

    RX1226 發表在 痞客邦 留言(0) 人氣()