9
4

More than 3 years have passed since last update.

DSL element 'android.dataBinding.enabled' is obsolete and has been replaced with 'android.buildFeatures.dataBinding'. の解消

Posted at

問題

Android Studio4.0にバージョンアップしてからコンパイルした際に以下のようなwarningが出ていた。

DSL element 'android.dataBinding.enabled' is obsolete and has been replaced with 'android.buildFeatures.dataBinding'.

解決

原因:データバインディングを有効にするコードブロックが新しくなったため。

app/build.gradle
android {
    ...
    dataBinding {
            enabled = true
    }
    ...
}

↓こちらに変更すれば良い。

app/build.gradle
android {
    ...
    buildFeatures {
        dataBinding true
    }
    ...
}
9
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
4