未找到与给定名称匹配的资源';android:Theme.Holo';。安卓API 9
当我将我的应用程序编译到API 19时,compile是好的,但如果我将应用程序编译到API 9,我有错误:未找到与给定名称匹配的资源';android:Theme.Holo';。安卓API 9,android,Android,当我将我的应用程序编译到API 19时,compile是好的,但如果我将应用程序编译到API 9,我有错误: Users/user/AndroidStudioProjects/test/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/19.1.0/res/values-v11/values.xml Error:Error retrieving parent for item: No resource fo
Users/user/AndroidStudioProjects/test/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/19.1.0/res/values-v11/values.xml
Error:Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo'.
...
我怎么能修好它?我想为api 9编译这个应用程序
build.gradle:
compileSdkVersion 9
...
minSdkVersion 9
targetSdkVersion 9
...
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:19.+'
}
AndroidManifest.xml:
<application
...
android:theme="@style/AppTheme" >
style.xml:
<style name="AppTheme" parent="android:Theme.Light">
您使用的是
AppCompat
,这意味着您需要使用它的轻型版本,而不是本机android非支持主题
示例:
更改此项:
<style name="AppTheme" parent="android:Theme.Light">
到
您的compile和sdk版本应与您测试的版本一样高(例如,本例中为19)。API 9中唯一应该出现的是您的MinSDK版本(如果您支持Froyo)。
<style name="AppTheme" parent="@style/Theme.AppCompat.Light">