appcompat
API レベル 10 でのみ使用するように割り当てられた空のプロジェクトにAndroid サポート ライブラリ ( ) を追加しようとしています。
そこで、以下のオプションで 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'.
...