Android中的Holo主题让应用程序停止运行不幸'

时间:2015-01-15 14:00:59

标签: android xml styles themes

所以我正在尝试设置我的应用程序样式,并且在使用Holo主题时遇到了问题。在早期版本的android中我没有兴趣,所以我不想使用AppCompat。 要进行错误检查,我创建了一个空白的应用程序,其中包含一个空白活动这是我的styles.xml:

    <resources>

    <!-- Base application theme. -->
    <style name="AppTheme" parent="@android:style/Theme.Holo.Light.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="android:actionBarStyle">@style/AppTheme_ActionBarTheme</item>
    </style>

    <style name="AppTheme_ActionBarTheme" parent="@android:style/Widget.Holo.Light.ActionBar">
        <item name="android:background">@color/light_green</item>
        <item name="android:titleTextStyle">@style/AppTheme_ActionBarTheme_Text</item>
    </style>

    <style name="AppTheme_ActionBarTheme_Text" parent="AppTheme_ActionBarTheme">
        <item name="android:textColor">@color/light</item>
    </style>

</resources>

这是我的AndroidManifest.xml:

    <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.fokamb.chmielowskim.fokamb" >
    <uses-sdk android:targetSdkVersion="15"  android:minSdkVersion="14"/>
    <application
        android:allowBackup="true"

        android:label="@string/app_name"

        android:theme="@style/AppTheme"

        >

        <activity
            android:name=".MainActivity"
            android:label="@string/main_act_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

我没有更改任何其他文件,我尝试在API级别为21的模拟器和带有api 19的手机上运行此应用程序。在两者上,我收到消息“不幸的是,FokaMB已停止” 即使在android studio的预览窗口中,该应用程序看起来像我喜欢它的方式。 那么,哪里可能是我的错误?如果我使用AppCompat应用程序工作正常,但我无法更改操作栏的文本颜色(即使背景更改)。任何帮助将不胜感激:)

0 个答案:

没有答案