Android – style parent: Cannot resolve symbol @android:…
Hello,
I want to use a style with a parent attribute, like this:
<style name="Theme.CustomActivityTheme" parent="@android:style/Theme.Holo.Light">
<!-- activity and action bar styles -->
</style>
But Intellij says to:
@android:style/Theme.Holo
Cannot resolve symbol '@android:style/Theme.Holo' Validates resource references inside Android XML files.
What can I do to fix this problem?
In my Manifest I have:
android:minSdkVersion="14"
android:targetSdkVersion="17"
I think this should actually be ok.
I use Intellij IDEA 12.1.2 and the last Version of the Android SDK
I look forward to helpful answers.:)
Please sign in to leave a comment.
I can verify this behaviour. I just created a new project and the style parent is market red.
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Application theme -->
<style name="MyTheme" parent="android:Theme">
<item name="android:listViewStyle">@style/myListView</item>
</style>
<style name="myListView" parent="@android:style/Widget.ListView">
<item name="android:background">#ff0000</item>
</style>
</resources>
If I just use "@android:style/Widget" it is green, but as soon as I write .ListView behind it, the first part is marked red. I could verify that the .ListView is there as the auto completion shows it...
It is a bug. I've created an issue for it in our tracker: http://youtrack.jetbrains.com/issue/IDEA-106740 Please, follow