I'm relying on the compatibility library to use action bars on older versions of Android. I've added it to my build.gradle
file like this:
dependencies {
compile 'com.android.support:appcompat-v7:+'
compile 'com.android.support:support-v4:+'
}
And an example of a styles.xml
file:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Base theme -->
<style name="AppName" parent="@style/Theme.AppCompat.Light"></style>
</resources>
The project builds successfully in Android Studio 0.4.4 both from the commandline and from the IDE. However, the following error appears when opening the file in the editor:
I've tried invalidating the cache, cleaning the project, syncing with Gradle and reimporting the project after deleting the IntelliJ files, but nothing changes. I also get errors like this in the build.gradle
file:
But I don't know if that's related to this specific problem. How do I make Android Studio find the compatibility library resources?