Android Studio 3.0 cannot resolve symbol Theme

前端 未结 10 788
青春惊慌失措
青春惊慌失措 2020-12-29 20:46

As stated in style.xml, there is a weird error, which shows Cannot resolve symbol \'Theme\', which is quite strange.

See pic of the error :-

My Project Spe

10条回答
  •  無奈伤痛
    2020-12-29 21:18

    Another possible reason is: Google's maven repository is not set for the build script.

    Open your project's main build.gradle add this line:

    buildscript {
        repositories {
            google()  <-- this
            // Be also sure that google() is before jcenter()
        }
    }
    

    Without this, it may not be able to download the Android Studio Gradle plugin 3.0+. It's not distributed in jCenter but in the Google's maven repository.

提交回复
热议问题