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

后端 未结 23 2099
半阙折子戏
半阙折子戏 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:44

    I have had the same problem. The only solution that worked for me was to manually delete the support libraries in file system and sync the project to let Android Studio download them again.

    Steps:

    1. Go to your project folder in File system
    2. Go to .idea\libraries
    3. Delete all the Gradle__com_android_support_****.xml files
    4. Open Android Studio
    5. Select File > Sync with File System
    6. Once that is done, Select File > Sync Project with Gradle Files
    7. Build Project

    And now your error should be gone!!!

    0 讨论(0)
  • 2020-11-27 12:44

    Mine was fixed by deleting the .gradle file from the folder and re-importing the project in Android Studio

    0 讨论(0)
  • 2020-11-27 12:46

    I also faced the problem with Android Studio 3.1 , syncing does not help me.

    Then I switched back to

    `'com.android.support:design:27.1.0'` from : `'com.android.support:design:27.1.1'`
    

    and added android.enableBuildCache=false to gradle.properties to disable build cache

    0 讨论(0)
  • 2020-11-27 12:47

    If none of these methods mentioned by other contributors does not work for you..

    Then please simply ignore this...

    Even flutter officials also said to ignore these errors..

    Caution*** Only ignore after trying all the methods.If above methods solve your errors then fine otherwise you can ignore these..

    This type of errors happen after installing latest version of flutter sdk,gradle ,android studio and other plugins -packages

    If you are using latest version then you have to ignore these errors.

    0 讨论(0)
  • 2020-11-27 12:48

    Deleted .idea and .gradle from project folder. Then sync with gradle files, it worked.

    0 讨论(0)
提交回复
热议问题