can't resolve AppCompatActivity

后端 未结 30 1883
星月不相逢
星月不相逢 2020-12-04 17:43

After renaming application package name, Android Studio displayed this error can\'t resolve symbol AppCompatActivity

Things I tried: <

30条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-04 18:31

    When all your dependencies and SDK tools are in-line and it still is giving sync error. Add this code in your build.Gradle and sync it:

    allprojects {
        repositories {
            jcenter()
            maven {
                url "https://maven.google.com"
            }
        }
    }
    

    Also like to point, before doing this I tested all tricks mentioned here. But only this worked for my Android (2.3) - Feb'17 release.

提交回复
热议问题