Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/201.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
未找到与给定名称匹配的资源';android:Theme.Holo';。安卓API 9_Android - Fatal编程技术网

未找到与给定名称匹配的资源';android:Theme.Holo';。安卓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

当我将我的应用程序编译到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 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">