Unresolved reference: BR (Android Studio)

后端 未结 4 2055
孤独总比滥情好
孤独总比滥情好 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:32

    Android Studio failed to import my BR class automatically. All solutions provided above failed. I just had to import the class manually, Android studio had created it correctly.

    SAMPLE:

    package your_packagename
    
    import your_packagename.BR
    import ...
    ...
    
    

    I think this happened due to Copy and Paste. When i typed BR manually, Android Stdio did the Automatic Import.

提交回复
热议问题