IDE “Cannot Resolve @style/Theme.Appcompat” when using v7 compatibility support theme

后端 未结 13 601
北恋
北恋 2020-12-14 06:02

This is not really a huge issue, as my project still builds and runs correctly (using gradle), but I\'m having trouble getting Android Studio to recognize the application co

13条回答
  •  有刺的猬
    2020-12-14 06:34

    My fix/problem was much simpler and different than most people here.

    My problem was similar in that I had an error like this:

    resource style/ThemeOverlay.AppCompat.Dark (...) not found
    

    The strange part was that I could build in debug mode, but not in release mode.

    My Android Manifest contained no errors. My issue was that I had two style.xml files in my resources folder.

    Simple Solution: Delete one of the style.xml files or merge them and you should be good. I had two styles that were almost exactly the same in my two .xml files. I could immediately build in release mode following the deletion of one of these files.

    [%]D - Time to clink the glasses and drink some beer. :D

提交回复
热议问题