0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

「databinding」でエラーになる

Posted at

Androidアプリ開発中にdatabindingでエラーになった。
ナレッジとして記述する。以下のようなimport文でエラーが起きたことを想定。

MainActivity.kt

import com.tapps520.app.databinding.FragmentAboutBinding

Gradle Scripts内の

build.gradle.kts (Module:app)

android {
    
    // 以下を追加する
    buildFeatures {
        viewBinding = true
        //noinspection DataBindingWithoutKapt
        dataBinding = true
    }

}

上記のようにして、Syncを実行して改善されたことを確認する。

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?