【发布时间】:2014-06-27 23:34:07
【问题描述】:
在尝试刷新、构建或清理我的项目时下载 New L SDK 和 20 SDK 后,我得到了一个
Error:Error retrieving parent for item: No resource found that matches the given name '@android:TextAppearance.Material.SearchResult.Subtitle'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Menu'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Small'.
Error:Error retrieving parent for item: No resource found that matches the given name '@android:TextAppearance.Material.SearchResult.Title'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionMode.Title'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Large'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Large'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionMode.Subtitle'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Small'.
这是我的 build.gradle
apply plugin: 'com.android.application'
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.+'
}
}
repositories {
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
signingConfigs{
release {
... Stuff Here ...
}
}
buildTypes {
debug {
runProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
zipAlign true
debuggable true
}
release {
runProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
zipAlign true
signingConfig signingConfigs.release
}
}
dexOptions {
incremental true
}
}
android {
compileSdkVersion 'android-L'
buildToolsVersion '20.0.0'
defaultConfig {
minSdkVersion 14
targetSdkVersion 'L'
}
}
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
...
Some Projects
...
compile 'com.android.support:cardview-v7:+'
compile 'com.android.support:recyclerview-v7:+'
compile 'com.android.support:appcompat-v7:+'
}
我觉得我几乎什么都试过了,我不知道还能尝试什么。 任何帮助将不胜感激。
我刚刚从 0.6.0 Canary 升级到新的 Android Studio Beta (0.8.0)
【问题讨论】:
-
尝试设置
targetSdkVersion 20。 -
事实证明,使用新的 SDK,您必须将目标和编译版本设置为“L”,这也意味着您无法在低于 L 或 20 的 SDK 上运行它。
-
查看此以获得更多帮助:stackoverflow.com/questions/42144415/…