Android AppCompat第21版强制Holo主题

use*_*612 7 android android-theme android-support-library

在我的项目中我使用appcompat-v7(修订版20),我的项目是针对android API级别19(KitKat),所以我可以使用Holo主题.我不小心将"Android支持库"更新为修订版21,因此我不得不将清单中的目标更改为API级别21(Lollipop).

因此,我的应用程序的默认主题更改为材质(例如复选框为绿色).有没有办法再次强制使用Holo主题?

的Manifest.xml:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="my.package"
    android:versionCode="1"
    android:versionName="1.0" >

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


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

        --- activities & receivers ---
    </application>

</manifest>
Run Code Online (Sandbox Code Playgroud)

Style.xml:

<resources>

    <style name="AppBaseTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">

    </style>


    <style name="AppTheme" parent="AppBaseTheme">
    </style>

</resources>
Run Code Online (Sandbox Code Playgroud)

use*_*612 0

我最终通过下载“Android 支持存储库”并使用 @CommonsWare 转换器将 .aar 项目转换为库解决了这个问题。