错误检索父项:没有资源的发现,升级到AppCompat V23之后匹配给定的名字 [英] Error retrieving parent for item: No resource found that matches the given name after upgrading to AppCompat v23

查看:546
本文介绍了错误检索父项:没有资源的发现,升级到AppCompat V23之后匹配给定的名字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直Android的程序性与Eclipse,并决定开始迁移到Android工作室。决定使用相同的SDK我已经有月食,则:

I've always programed android with Eclipse and decided to start migrating to Android Studio. Decided to use the same SDK I already had for eclipse, then:

  • 在开始一个新项目
  • 设置最低SDK 4.0(API等级14)
  • 选择空白活动选项
  • 的活动名称和布局名称
  • 使用默认名称
  • 点击完成
  • Started a new project
  • Set minimum SDK 4.0 (API Level 14)
  • Choose Blank Activity option
  • Used Default names for Activity Name and Layout Name
  • Hit Finish

几秒钟后摇篮完成构建,并引发了我2个错误,在文件中的以下信息Teste4\app\build\intermediates/exploded-aar\com.android.support\appcompat-v7\23.0.0\res\values-v23\values-v23.xml

After a few seconds Gradle finishes the build, and it throws me 2 errors with the following messages in file Teste4\app\build\intermediates/exploded-aar\com.android.support\appcompat-v7\23.0.0\res\values-v23\values-v23.xml

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

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

文件 - >项目结构 - >模块:应用程序(左列) - >属性标签的,我已经设置了以下版本:

Under File -> Project Structure -> Modules: app (left column) -> Properties tab, I have the following versions set up:

  • 在编译SDK版本:Android的5.1(API等级22)
  • 在生成工具版本:23.0.2

我应该怎么做才能解决这个问题?

What should I do in order to fix this?

已经尝试过什么建议在这里,但没有奏效 <一href="http://stackoverflow.com/questions/26431676/appcompat-v721-0-0-no-resource-found-that-matches-the-given-name-attr-andro">appcompat-v7:21.0.0':没有资源的发现,匹配给定的名字:ATTR机器人:actionModeShareDrawable

Already tried what was suggested here, but didn't work appcompat-v7:21.0.0': No resource found that matches the given name: attr 'android:actionModeShareDrawable'

谢谢!

推荐答案

您编译的SDK版本必须支持库的主版本相匹配。

Your compile SDK version must match the support library's major version.

由于您使用的是支持库的版本23,你需要编译针对Android SDK的23版本。

Since you are using version 23 of the support library, you need to compile against version 23 of the Android SDK.

另外,您可以继续编写针对Android SDK的22版通过切换到最新的支持库V22。

Alternatively you can continue compiling against version 22 of the Android SDK by switching to the latest support library v22.

这篇关于错误检索父项:没有资源的发现,升级到AppCompat V23之后匹配给定的名字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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