0

i'm working on a project that was given to me, it all fine, except for some errors in the styles.xml file:

file: res/values-v11/styles.xml

    <style name="AppTheme" parent="android:style/Theme.Holo.Light">
    <item name="android:actionBarStyle">@style/ActionBar</item>
    <item name="android:windowContentOverlay">@drawable/actionbar_shadow</item>
</style>

<style name="ActionBar" parent="android:style/Widget.Holo.Light.ActionBar">
    <item name="android:background">#eee</item>
    <item name="android:titleTextStyle">@style/ActionBarTitle</item>
    <item name="android:icon">@drawable/ic_home</item>
</style>

<style name="ActionBarTitle">
    <item name="android:textColor">@color/actionbar_title_color</item>
</style>

give me that errors:

error: Error retrieving parent for item: No resource found that matches the given name 'android:style/Theme.Holo.Light'. error: Error: No resource found that matches the given name: attr 'android:actionBarStyle'. error: Error retrieving parent for item: No resource found that matches the given name 'android:style/Widget.Holo.Light.ActionBar'. error: Error: No resource found that matches the given name: attr 'android:titleTextStyle'.

and file: res/values-v13/styles.xml

<style name="ActionBarTitle" parent="android:style/TextAppearance.Holo.Widget.ActionBar.Title">
    <item name="android:textColor">@color/actionbar_title_color</item>
</style>

give thah other error:

error: Error retrieving parent for item: No resource found that matches the given name 'android:style/TextAppearance.Holo.Widget.ActionBar.Title'.

Someone can help me to fix it?

4

1 回答 1

0

在 Eclipse 中设置我的项目时遇到了类似的问题。这是您的项目所针对的 Google API 的问题。我打赌这会解决它:

查看位于项目主目录中的 project.properties 文件。目标应该是:

target=android-16 (or Google Inc.:Google APIs:16)

我打赌你的是 target=android-8 (Google Inc.:Google APIs:8)?如果这不能解决问题,请分享位于您的 android 清单中的 uses-sdk 块,以便我们可以从那里进行故障排除。它应该看起来像这样:

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="16" />

希望这可以帮助

于 2013-12-20T18:32:51.367 回答