Unresolved reference: BR (Android Studio)

后端 未结 4 2054
孤独总比滥情好
孤独总比滥情好 2021-01-01 13:47

My top level build.gradle:

buildscript {
    ext.kotlin_version = \'1.2.41\'
    ext.lifecycle_version = \"1.1.1\"
    repositories {
        google()
               


        
4条回答
  •  说谎
    说谎 (楼主)
    2021-01-01 14:45

    I manually typed the line "binding.setVariable(BR.item, item)" and it worked for me. Android studio shows the suggestion of importing BR. Choose the one from your project. Also enable databinding = true in gradle.

提交回复
热议问题