我正在尝试将 Android 支持库 ( appcompat
) 添加到仅分配用于 API 级别 10 的空项目中。
因此,我使用以下选项创建了 Android Studio 项目。
然后我在依赖项区域中添加支持库。
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android'
repositories {
mavenCentral()
}
android {
compileSdkVersion 10
buildToolsVersion "18.0.1"
defaultConfig {
minSdkVersion 10
targetSdkVersion 10
}
}
dependencies {
compile 'com.android.support:appcompat-v7:18.0.0'
}
然后我得到以下编译错误
MyAppProject/MyApp/build/exploded-bundles/ComAndroidSupportAppcompatV71800.aar/res/values-v14/values.xml
Gradle: Error retrieving parent for item: No resource found that matches the given name '@android:TextAppearance.Holo.SearchResult.Subtitle'.
Gradle: Error retrieving parent for item: No resource found that matches the given name '@android:TextAppearance.Holo.SearchResult.Title'.
Gradle: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.PopupMenu.Large'.
...
MyAppProject/MyApp/build/exploded-bundles/ComAndroidSupportAppcompatV71800.aar/res/values-v11/values.xml
Gradle: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo'.
Gradle: No resource found that matches the given name: attr 'android:windowActionBar'.
...