No resource found that matches the given name '

2020-02-07 03:49发布

问题:

below is my xml file.It gives me err saying thaty "error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light.DarkActionBar'."

<!--
    Base application theme for API 14+. This theme completely replaces
    AppBaseTheme from BOTH res/values/styles.xml and
    res/values-v11/styles.xml on API 14+ devices.
-->

<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
    <!-- API 14 theme customizations can go here. -->
</style>

回答1:

Change parent attribute to parent="android:style/Theme.Holo.Light.DarkActionBar"



回答2:

Right-click your project in the Package Explorer > select Properties > select Android > and set Project Build Target to API level 14 or higher.



回答3:

Right Click your project->properties->Android, then Add android-support-v7-appcompat

You can import this library from your android-sdk folder->extras->android->support->v7->appcompat