31
votes

Error: No resource found that matches the given name: attr 'listViewStyle'

I have tried everything from here. Nothing is working.

I have imported API demos to the eclipse of API version 15 and also giving error in src files like "The import com.example.android.apis.R cannot be resolved"

Help me out please.

I have error wit this in values-v11/styles.xml file

<style name="ThemeHolo" parent="android:Theme.Holo">
</style>

<!-- For API level 11 or later, the Holo theme is available and we prefer that. -->
<style name="ThemeHoloDialog" parent="android:Theme.Holo.Dialog">
</style>

<!-- For API level 11 or later, we can use the magical DialogWhenLarge theme. -->
<style name="ThemeDialogWhenLarge" parent="android:style/Theme.Holo.DialogWhenLarge">
</style>

and also I have an error in values/styles.xml "error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Holo.Light.NoActionBar'." in following lines

<style name="BadTheme" parent="@android:style/Theme.Holo.Light.NoActionBar">
</style>
6
Cannot resolve symbol 'android:Theme.Material.Light' in <style name="AppBaseTheme" parent="android:Theme.Material.Light"></style> in valules-v21 in android studioPankaj Nimgade

6 Answers

31
votes

You can refer to the Holo theme as parent="@android:style/Theme.Holo", but to use the Holo Theme you have to set the build target in your manifest to API level 11 or later, also you have to put the style.xml file containing the Holo theme to the folder values-v11

20
votes

Just delete the HOLO as this resource is not available for that API Level

        parent="android:Theme.Light"
3
votes

Changing the manifest's android:targetSdkVersion value to the correct version solved it for me.

1
votes

I have faced a similar issue even with the correct settings in Properties etc. It seems a problem with Eclipse. I have removed the content of the xml files, then "save", then enter again the values i.e.

<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">

and "save" again.

0
votes

Have your written exactly this?

<item name="android:listViewStyle"> 
0
votes

I resolved the same issue by adding

 android:theme="@style/AppTheme"    

within application tag in the AndroidManifest.xml file. This will recognize the app theme.

<application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" 
        android:debuggable="true" > 
        <activity 
            ...
        </activity>
      ...
</application>