Cannot resolve symbol 'Theme' in styles.xml (Android Studio)

后端 未结 23 2254
半阙折子戏
半阙折子戏 2020-11-27 11:56

Since today, Android Studio can\'t find the AppCompat themes in styles.xml, but for example AppCompatActivity in code does get recognized. My Android Studio version

23条回答
  •  一整个雨季
    2020-11-27 12:37

    In newer versions of Android Studio, we are asked to use 'AppCompat'. Some users uncheck that and still use the Theme.AppCompat. That makes up this error. Same happened with me.

    Solution is to add this line in your build.gradle (app).

    compile 'com.android.support:appcompat-v7:26.1.0'
    

提交回复
热议问题