【发布时间】:2017-09-09 08:33:33
【问题描述】:
这些是我面临的一些错误,此处发布的答案不是 也帮助我。也许任何人都可以提出其他建议:
Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.
Error:(3) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.
Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.
Error:(3) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
这是我的 gradle 文件,我不明白为什么它不接受 更新的 gradle 构建:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '25.0.2'
defaultConfig {
applicationId "com.allianz.azemployee"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.squareup.okhttp3:okhttp:3.4.1'
compile 'com.google.android.gms:play-services-gcm:10.2.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.google.code.gson:gson:2.7'
compile 'com.github.szugyi:Android-CircleMenu:1.1.2'
compile 'com.bcgdv.asia.lib:fanmenu:1.2'
}
apply plugin: 'com.google.gms.google-services'
我一直在尝试 stackoverflow 的一些选项,但似乎没有一个有效。 compile 'com.android.support:appcompat-v7:23.4.0' 带有红色下划线 This support library should not use a different version(25) than the compile version (23)
这是什么意思?还有什么是 XML 中的错误?
更新 我现在遇到了这个错误:
Error:(24, 25) No resource found that matches the given name (at 'background' with value '@color/common_action_bar_splitter').
/Users/AmosPune/Desktop/AZEmployee_2_sept_final/AZEmployee_2_sept_final/app/src/main/res/layout/tab_layout.xml
/Users/AmosPune/Desktop/AZEmployee_2_sept_final/AZEmployee_2_sept_final/app/build/intermediates/res/merged/debug/layout/tab_layout.xml
Error:(24, 25) No resource found that matches the given name (at 'background' with value '@color/common_action_bar_splitter').
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
【问题讨论】:
-
将您的 compileSdkVersion 版本更改为 25
-
编译'com.android.support:appcompat-v7:25.0.2'