3

我遵循了几个网站上的指南,但我无法让它工作。我确保他们是从现有源代码创建项目,并将其作为库包含在我的项目中,检查目标等。我不确定我缺少什么。

我收到以下错误:

[2012-08-29 21:04:45 - IT Guru] C:\Workspace\HoloEverywhereLib\res\values\styles.xml:246: error: Error: No resource found that matches the given name: attr 'windowActionBar'.
[2012-08-29 21:04:45 - IT Guru] C:\Workspace\HoloEverywhereLib\res\values\styles.xml:247: error: Error: No resource found that matches the given name: attr 'windowNoTitle'.
[2012-08-29 21:04:45 - IT Guru] C:\Workspace\HoloEverywhereLib\res\values-v14\styles.xml:12: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Sherlock'.
[2012-08-29 21:04:45 - IT Guru] C:\Workspace\HoloEverywhereLib\res\values-v14\styles.xml:14: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Sherlock.Light'.
[2012-08-29 21:04:45 - IT Guru] C:\Workspace\HoloEverywhereLib\res\values-v14\styles.xml:16: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Sherlock.Light.DarkActionBar'.
[2012-08-29 21:04:45 - IT Guru] C:\Workspace\HoloEverywhereLib\res\values-v14\styles.xml:18: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Sherlock.ForceOverflow'.
[2012-08-29 21:04:45 - IT Guru] C:\Workspace\HoloEverywhereLib\res\values-v14\styles.xml:20: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Sherlock.Light.ForceOverflow'.
[2012-08-29 21:46:56 - IT Guru] C:\Workspace\HoloEverywhereLib\res\values\styles.xml:247: error: Error retrieving parent for item: No resource found that matches the given name '@style/Theme.HoloEverywhereDark.Sherlock'.
[2012-08-29 21:46:56 - IT Guru] C:\Workspace\HoloEverywhereLib\res\values\styles.xml:253: error: Error retrieving parent for item: No resource found that matches the given name '@style/Theme.HoloEverywhereLight.Sherlock'.

遵循的指南:

导入 HoloEverywhere 时出错

https://github.com/ChristopheVersieux/HoloEverywhere

4

3 回答 3

3

您链接到的 HoloEverywhere 指南有点过时,这两个主题现在称为Holo.ThemeHolo.Theme.Light

因此,在您的 Android 清单中更改这些行:

android:theme="@style/Theme.HoloEverywhereDark.Sherlock"

或者

android:theme="@style/Theme.HoloEverywhereLight.Sherlock"

 android:theme="@style/Holo.Theme"

或者

android:theme="@style/Holo.Theme.Light"

然后 Project->Clean 看看错误是否消失。

于 2012-12-16T12:56:52.417 回答
0

当您使用 Sherlock 主题(未集成 Android 主题)时,您需要在 ProjectName/ 文件夹下导入该附加包

+项目名称

  1. 源代码
  2. 安卓2.1
  3. Sherlock.jar(在根文件夹下导入 .jar 文件)
  4. 垃圾桶
  5. . . .
于 2012-08-30T05:55:06.053 回答
0

I solved the problem by setting the android target of all the projects to the newest android version (v.17 atm)

于 2012-12-26T19:15:19.977 回答