首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用HoloEverywhere将Holo主题添加到2.3.6/Error

使用HoloEverywhere将Holo主题添加到2.3.6/Error
EN

Stack Overflow用户
提问于 2012-12-05 14:58:33
回答 2查看 6.1K关注 0票数 1

如何在我的应用程序中使用holoeverywhere?

在将库添加到我的项目时,指南如下:

Error importing HoloEverywhere

代码语言:javascript
复制
`[2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values\abs__styles.xml:214: error: Error: No resource found that matches the given name: attr 'android:spinnerMode'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__styles.xml:63: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Spinner'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__styles.xml:65: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.Spinner'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__styles.xml:68: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ListView.DropDown'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__styles.xml:70: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ListView.DropDown'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__styles.xml:73: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.PopupWindow'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__styles.xml:75: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.PopupWindow'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values\abs__styles.xml:258: error: Error: No resource found that matches the given name: attr 'android:animationResolution'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__styles.xml:78: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ProgressBar'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__styles.xml:80: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ProgressBar'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__styles.xml:83: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ProgressBar.Horizontal'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__styles.xml:85: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ProgressBar.Horizontal'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__styles.xml:88: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.AutoCompleteTextView'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__styles.xml:90: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.AutoCompleteTextView'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values\abs__styles.xml:328: error: Error: No resource found that matches the given name: attr 'android:textAllCaps'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__styles.xml:93: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionBar.Menu'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__styles.xml:96: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionBar.Title'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__styles.xml:98: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionBar.Title.Inverse'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__styles.xml:100: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionBar.Subtitle'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__styles.xml:102: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionBar.Subtitle.Inverse'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__styles.xml:104: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionMode.Title'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__styles.xml:106: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionMode.Title.Inverse'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__styles.xml:108: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionMode.Subtitle'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__styles.xml:110: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionMode.Subtitle.Inverse'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__styles.xml:113: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.PopupMenu'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__styles.xml:115: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.PopupMenu.Large'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__styles.xml:117: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.PopupMenu.Large'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__styles.xml:119: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.PopupMenu.Small'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__styles.xml:121: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.PopupMenu.Small'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v11\abs__themes.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v11\abs__themes.xml:6: error: Error: No resource found that matches the given name: attr 'android:windowActionBar'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__themes.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v11\abs__themes.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v11\abs__themes.xml:10: error: Error: No resource found that matches the given name: attr 'android:windowActionBar'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__themes.xml:6: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__themes.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light.DarkActionBar'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__themes.xml:14: error: Error: No resource found that matches the given name: attr 'android:actionBarWidgetTheme'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__themes.xml:22: error: Error: No resource found that matches the given name: attr 'android:windowActionBar'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__themes.xml:26: error: Error: No resource found that matches the given name: attr 'android:windowActionBar'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values\abs__themes.xml:196: error: Error: No resource found that matches the given name: attr 'android:windowActionBar'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values\abs__themes.xml:197: error: Error: No resource found that matches the given name: attr 'android:windowActionModeOverlay'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values\abs__themes.xml:198: error: Error: No resource found that matches the given name: attr 'android:windowCloseOnTouchOutside'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__themes.xml:30: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Dialog'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values\abs__themes.xml:222: error: Error: No resource found that matches the given name: attr 'android:windowActionBar'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values\abs__themes.xml:223: error: Error: No resource found that matches the given name: attr 'android:windowActionModeOverlay'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values\abs__themes.xml:224: error: Error: No resource found that matches the given name: attr 'android:windowCloseOnTouchOutside'.
 [2012-12-05 20:23:11 - com.sditya.quadratic.equation.Quadratic] C:\Users\aditya\workspace\ActionBarSherlock\library\res\values-v14\abs__themes.xml:32: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light.Dialog'.`

或者告诉我,在2.3.6上运行的应用程序中是否有其他简单的方式来添加Holo黑暗主题

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2012-12-15 19:47:21

如果你还没解决你的问题,我已经找到了解决办法。我已经在DemoActivity应用程序上做了HoloEverywhere,但我认为在你的应用程序中使用它也不会有问题。

最重要的是导入所有libarary项目,顺序并不重要:

  • 库文件夹中的HoloEverywhere库
  • 从滑动菜单文件夹滑行菜单
  • 巴洛克库中的ActionBarSherlock库

首先关闭所有不相关的项目,因为它们的错误/警告将从问题控制台中消失,因此更容易找到连接到HoloEverywhere的项目。

之后,请确保您在所有的报表文件中

<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="16" />

您甚至可以更改16到17,因为它是最新的SDK。对这一行的最短解释意味着,这个应用程序可以在任何Android设备上运行,SDK在7以上和16以下。

然后,对于所有添加的库,请尽可能更改项目构建目标(我将其放在4.2)。我认为至少它必须是SDK14 (4.0)。您将看到目标已经更改,因为在项目树中,您将拥有带有适当的android目标库的文件夹。我必须警告你,这个文件夹的更改可能需要一两分钟--继续看进度条。

如何更改项目构建目标:

鼠标右键点击项目名称,->属性,on the bottom almost of the list在打开窗口,左面板->,Android,->右面板,并选择正确的目标。那就申请,好的。

最后一件事是清理每个项目(同样可能需要一段时间,特别是如果您有自动构建选项):菜单栏->Project->Clean->选择与此相关的所有项目(如果您关闭了所有与该应用程序无关的项目)和OK。

由于这一点,您将使用在高级SDK中添加的内容重新构建R文件,这样您就可以在代码中引用它们。

现在,您不应该有更多的错误,只有警告。

如果你仍然有一些问题,在下面评论它,也许我可以帮助你。

为了显示它在那里工作,您可以从运行Android2.3.4的实际设备上获取屏幕截图。

如果这是有用的,或者是你的问题的答案,不要忘记正确地标记它。

票数 4
EN

Stack Overflow用户

发布于 2012-12-05 15:08:41

  1. 从工作空间中删除所有项目;
  2. 进口ActionBarSherlock;
  3. 进口HoloEverywhere;
  4. 导入你的项目;
  5. 确保HoloEverywhere引用的是ActionBarSherlock,而您的引用是引用HoloEverywhere (您可以通过访问项目属性-> Android -> Library -> Add)来做到这一点;
  6. 禁用项目->自动生成;
  7. 清理所有项目(记得立即取消对开始构建的检查);
  8. 右键单击ActionBarSherlock项目,然后构建项目;
  9. 分别对HoloEverywhere和您的用户进行同样的操作。

您必须根据每个项目的依赖顺序分别构建它们。

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13726018

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档