Android在实现定制主题方面的问题

Android在实现定制主题方面的问题,android,themes,Android,Themes,我的android项目 AndoidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.myfirstapp" android:versionCode="1" android:versionName="1.0" >

我的android项目

AndoidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.myfirstapp"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="11"
        android:targetSdkVersion="17" />

    <application
        android:allowBackup="true"
        android:debuggable="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/CustomActionBarTheme" >
        <activity
            android:name="com.example.myfirstapp.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity 
            android:name="com.example.myfirstapp.DisplayMessageActivity"
            android:label="@string/title_activity_display_message"
            android:parentActivityName="com.example.myfirstapp.MainActivity" >
         <meta-data 
             android:name="android.support.PARENT_ACTIVITY"
             android:value="com.example.myfirstapp.MainActivity" /> 
        </activity>
    </application>


</manifest>
我有错误

检索项的父项时出错:未找到与给定名称“@style/Theme.Holo.Light.darkaActionBar”匹配的资源。
和 检索项的父项时出错:未找到与给定名称“@style”匹配的资源/
Widget.Holo.Light.ActionBar.Solid.Inverse.

您必须在style之前编写
android:
,即
@android:style/Theme.Holo.Light.DarkActionBar

您可以将themes.xml添加到styles.xml中

它们没有包括使用的所有文件的示例,也没有包括它们如何创建文件或需要创建文件的示例

除了忘记使用@android之外,他们似乎没有提到像actionbar_background.xml这样的文件必须在res/drawable/下创建,或者themes.xml应该在res/values下创建/

他们似乎使用以下方法创建了样式(用于指南中的图片):

和生成的文件如下:

他们在本章的其余部分做同样的事情。当你是新手时,这本指南很让人困惑


根据所问的问题,我假设他们使用了at android开发者。

现在出现了错误
错误:错误:未找到与给定名称匹配的资源(在'android:background'处,值为'@drawable/actionbar_background')。
您有一个名为“actionbar_background”的drawable吗在您的项目中?检查您的res/drawable或res/drawable目录。有actionbar_background.png或actionbar_background.xml吗?没有。我指的是这个例子
http://developer.android.com/training/basics/actionbar/styling.htm
他们似乎也没有。你能给我个建议吗。我应该怎么做来解决这个问题?也许你现在可以暂时使用一种简单的颜色。像#ffccff。您可以稍后添加自己的图像背景。
<?xml version="1.0" encoding="utf-8"?>
<resources>
      <!-- the theme applied to the application or activity -->
      <style name="CustomActionBarTheme"  
          parent="@style/Theme.Holo.Light.DarkActionBar">
       <item name="android:actionBarStyle">@style/MyActionBar</item> 
       </style>      <!-- ActionBar styles -->

       <style name="MyActionBar"            
           parent="@style/Widget.Holo.Light.ActionBar.Solid.Inverse">
       <item name="android:background">@drawable/actionbar_background</item>
       </style>  
</resources>