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

后端 未结 13 680
北恋
北恋 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:45

    A common problem. In my case this works:

    In "android-support-v7-appcompat" project:

    -Delete “android-support-v7-appcompat” from Package explorer.
    -Import again and check “Copy into workspace”
    -In Properties -> Android -> in Project build target, uncheck Android 2.2 and check Android 4.1.2
    -In Java build path, uncheck if you have any .jar library, and uncheck the Dependences
    

    In other hand, the proyect that uses “android-support-v7-appcompat”

    in Propiedades -> Android add the library, but uncheck "IsLibrary”.
    -In Android -> Project build tarjet check Android 4.0.
    -In "Java Build Path" -> Order and Export -> Unchecked the .jar library
    -Finally do a “Project -> Clean” both projects 
    

提交回复
热议问题