DataBinding not working after Upgrade Android Studio 2.3

后端 未结 7 1316
挽巷
挽巷 2021-02-05 10:47

DataBinding worked very well in my project, But after upgrade Android Studio 2.3 today . Run \'app\' failed because following error :

Error:(1         


        
7条回答
  •  迷失自我
    2021-02-05 11:22

    I have also faced the same issue. I was using ButterKnife and Dagger!!

    Solved as follow

    1) Remove from app level gradle file:

     apply plugin: 'android-apt' 
     or apply plugin: 'com.neenbedankt.android-apt'
    

    2) Remove from project level gradle file:

    classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
    

    3) And simply change "apt to annotationProcessor" as following dependencies:

     apt 'com.jakewharton:butterknife-compiler:8.5.1',
     apt "com.google.dagger:dagger-compiler:2.5"
    

    To:

    annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1',
    annotationProcessor "com.google.dagger:dagger-compiler:2.5"
    

提交回复
热议问题