问题
in my project I was using appcompat-v7 (revision 20), and my project was targeting android API level 19 (KitKat), so I could use Holo theme. I accidentally updated "Android Support Library" to revision 21, so I had to change the target in manifest to API level 21 (Lollipop).
Because of this, my app's default theme changed to Material (e.g. checkboxes are green). Is there a way to force using Holo theme again?
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>
Style.xml:
<resources>
<style name="AppBaseTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
</style>
<style name="AppTheme" parent="AppBaseTheme">
</style>
</resources>
回答1:
I finally solved this problem by downloading the "Android support repository" and by converting the .aar project to a library using @CommonsWare converter.
来源:https://stackoverflow.com/questions/26441834/android-appcompat-revision-21-force-holo-theme