Android的支持库V7:错误检索父项 [英] Android Support Library v7: Error retrieving parent for item
问题描述
我试图构建一个Android支持库V7样本。
I am trying to build the Android Support Library v7 samples.
对于这一点,我创建通过Eclipse中sampleproject - >新的Android示例项目,并添加了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.
- 右键点击 Android的支持-V7-mediarouter 项目,选择属性
- 选择机器人
- 在库部分的底部,点击添加... 。
- 选择 Android的支持-V7-appcompat 在对话框中。
- 点击应用
- 点击确定
- 请创建一个干净的 Android的支持-V7-mediarouter 的项目。
- Right click android-support-v7-mediarouter project, select Properties
- Select Android
- In the Library section at the bottom, click Add....
- Select android-support-v7-appcompat in the dialog.
- Click Apply.
- Click OK.
- Do a clean build on the android-support-v7-mediarouter project.
这篇关于Android的支持库V7:错误检索父项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!