DataBinding worked very well in my project, But after upgrade Android Studio 2.3 today . Run \'app\' failed because following error :
Error:(1
android-apt
and hence using apt
has been deprecated since Android Studio 2.2.
Following the android-apt migration guide, instead add the following to your build.gradle
:
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0' // use same gradle version!
annotationProcessor 'com.android.databinding:compiler:2.3.0'
}
If you are using Kolin, instead use:
apply plugin: 'kotlin-kapt'
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0' // use same gradle version!
kapt 'com.android.databinding:compiler:2.3.0'
}