检索父项时出错:找不到与给定名称'android:TextAppearance.Material.Widget.Button.Borderless.Colored'相匹配的资源 [英] Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'

查看:115
本文介绍了检索父项时出错:找不到与给定名称'android:TextAppearance.Material.Widget.Button.Borderless.Colored'相匹配的资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在android studio中启动新项目时,我收到了这些错误.

I received these errors when i started new project in android studio.

错误:(1)检索项目的父项时出错:未找到与给定名称'android:TextAppearance.Material.Widget.Button.Borderless.Colored'相匹配的资源.

Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.

错误:(1)检索项目的父项时出错:未找到与给定名称'android:TextAppearance.Material.Widget.Button.Borderless.Colored'相匹配的资源.

Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.

错误:任务':app:processDebugResources'的执行失败. com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:处理'command'C:\ Program Files(x86)\ Android \ android-sdk \ build-tools \ 23.0.2 \ aapt .exe''以非零的退出值1结束

Error:Execution failed for task ':app:processDebugResources'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files (x86)\Android\android-sdk\build-tools\23.0.2\aapt.exe'' finished with non-zero exit value 1

android项目中的文件包含错误,如下所示:

File in android project contains error is given below:

 <?xml version="1.0" encoding="utf-8"?>
 <resources>
  <style name="Base.TextAppearance.AppCompat.Widget.Button.Borderless.Colored" parent="android:TextAppearance.Material.Widget.Button.Borderless.Colored"/>
  <style name="Base.TextAppearance.AppCompat.Widget.Button.Colored" parent="android:TextAppearance.Material.Widget.Button.Colored"/>
  <style name="TextAppearance.AppCompat.Notification.Info.Media"/>
  <style name="TextAppearance.AppCompat.Notification.Media"/>
  <style name="TextAppearance.AppCompat.Notification.Time.Media"/>
  <style name="TextAppearance.AppCompat.Notification.Title.Media"/>
 </resources>

build.gradle:

build.gradle:

apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {
    applicationId "com.example.anmol.checkboxapp"
    minSdkVersion 15
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:25.1.0'
}

如果有人可以解决此问题,请帮助

If anyone have solution of this problem so please help

推荐答案

您的编译SDK版本必须与支持库匹配.因此,请执行以下一项:

Your compile SDK version must match the support library. so do one of the following:

1.在您的Build.gradle更改中

compile 'com.android.support:appcompat-v7:23.0.1'

2.或更改:

compileSdkVersion 23
buildToolsVersion "23.0.2"

compileSdkVersion 25
buildToolsVersion "25.0.2"

正在使用:compile 'com.android.support:appcompat-v7:25.3.1'

我建议您使用第二种方法,因为它使用的是最新的SDK-这样您就可以利用最新的SDK的新功能.

i would recommend to use the 2nd method as it is using the latest sdk - so you can able to utilize the new functionality of the latest sdk.

最新示例-

如果在更新版本期间遇到问题,例如:

If you face problem during updating the version like:

浏览此答案使用 Google Maven存储库

编辑

如果您使用的是 Facebook帐户工具包

请勿使用:compile 'com.facebook.android:account-kit-sdk:4.+'

而不是使用特定的版本,例如:

instead use a specific version like:

compile 'com.facebook.android:account-kit-sdk:4.12.0'

sdk 23帐户工具包中的最新版本存在问题

there is a problem with the latest version in account kit with sdk 23

编辑

对于 Facebook Android Sdk

在您的build.gradle中,而不是:

compile 'com.facebook.android:facebook-android-sdk: 4.+'

使用特定版本:

compile 'com.facebook.android:facebook-android-sdk:4.18.0'

Facebook sdk中的最新版本与Android sdk版本23中存在问题.

there is a problem with the latest version in Facebook sdk with Android sdk version 23.

这篇关于检索父项时出错:找不到与给定名称'android:TextAppearance.Material.Widget.Button.Borderless.Colored'相匹配的资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆