Android的支持库V7:错误检索父项 [英] Android Support Library v7: Error retrieving parent for item

查看:117
本文介绍了Android的支持库V7:错误检索父项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图构建一个Android支持库V7样本。

I am trying to build the Android Support Library v7 samples.

对于这一点,我创建通过Eclipse中sampleproject - >新的Andr​​oid示例项目,并添加了Android的支持,v7- *的项目为Android项目在现有code到Eclipse,并取得了示例项目引用它们

For that, I created an sampleproject through Eclipse -> New Android Sample Project and added the android-support-v7-* projects as "Android Project From Existing Code" to Eclipse, and made the sample project reference them.

不过,我收到以下错误 Android的支持-V7-mediarouter / RES /价值/ styles.xml

But I am getting the following errors in android-support-v7-mediarouter/res/values/styles.xml:

错误:错误检索父项:没有资源的发现,匹配给定的名字Widget.AppCompat.ActionButton(第18行)

错误:错误检索父项:没有资源的发现,匹配给定的名字Widget.AppCompat.Light.ActionButton(第28行)

我能做些什么来修复这些错误,并建立示例项目?

What can I do to fix these errors and build the sample project?

推荐答案

您必须使Android的支持-V7-mediarouter项目知道了Android支持-V7-appcompat项目为引用的库。

You must make the android-support-v7-mediarouter project "aware" of the android-support-v7-appcompat project as a referenced library.

  1. 右键点击 Android的支持-V7-mediarouter 项目,选择属性
  2. 选择机器人
  3. 部分的底部,点击添加...
  4. 选择 Android的支持-V7-appcompat 在对话框中。
  5. 点击应用
  6. 点击确定
  7. 请创建一个干净的 Android的支持-V7-mediarouter 的项目。
  1. Right click android-support-v7-mediarouter project, select Properties
  2. Select Android
  3. In the Library section at the bottom, click Add....
  4. Select android-support-v7-appcompat in the dialog.
  5. Click Apply.
  6. Click OK.
  7. Do a clean build on the android-support-v7-mediarouter project.

这篇关于Android的支持库V7:错误检索父项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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