当前位置: 首页 > 面试题库 >

ActionBarSherlock 4.0无法正常工作。但是3.5.1可以

穆歌者
2023-03-14
问题内容

如果我使用ActionBarSherlock 3.5.1,则一切正常且正常。但是,如果我想使用4.0 RC1,则会出现错误。

[2012-02-25 10:08:19 - SherlockApp] /home/leandros/workspace/ActionBarSherlock40/res/values-v14/abs__styles.xml:6: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar.Solid'.
[2012-02-25 10:08:19 - SherlockApp] /home/leandros/workspace/ActionBarSherlock40/res/values-v14/abs__styles.xml:10: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.Solid'.
[2012-02-25 10:08:19 - SherlockApp] /home/leandros/workspace/ActionBarSherlock40/res/values-v14/abs__styles.xml:12: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.Solid.Inverse'.
[2012-02-25 10:08:19 - SherlockApp] /home/leandros/workspace/ActionBarSherlock40/res/values-v14/abs__styles.xml:19: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.TabView.Inverse'.
[2012-02-25 10:08:19 - SherlockApp] /home/leandros/workspace/ActionBarSherlock40/res/values-v14/abs__styles.xml:26: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.TabBar.Inverse'.
[2012-02-25 10:08:19 - SherlockApp] /home/leandros/workspace/ActionBarSherlock40/res/values/abs__styles.xml:101: error: Error: No resource found that matches the given name: attr 'android:textAllCaps'.
[2012-02-25 10:08:19 - SherlockApp] /home/leandros/workspace/ActionBarSherlock40/res/values-v14/abs__styles.xml:33: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.TabText.Inverse'.
[2012-02-25 10:08:19 - SherlockApp] /home/leandros/workspace/ActionBarSherlock40/res/values-v14/abs__styles.xml:55: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionMode.Inverse'.
[2012-02-25 10:08:19 - SherlockApp] /home/leandros/workspace/ActionBarSherlock40/res/values/abs__styles.xml:244: error: Error: No resource found that matches the given name: attr 'android:textAllCaps'.
[2012-02-25 10:08:19 - SherlockApp] /home/leandros/workspace/ActionBarSherlock40/res/values-v14/abs__styles.xml:88: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionBar.Menu'.
[2012-02-25 10:08:19 - SherlockApp] /home/leandros/workspace/ActionBarSherlock40/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.Title.Inverse'.
[2012-02-25 10:08:19 - SherlockApp] /home/leandros/workspace/ActionBarSherlock40/res/values-v14/abs__styles.xml:97: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionBar.Subtitle.Inverse'.
[2012-02-25 10:08:19 - SherlockApp] /home/leandros/workspace/ActionBarSherlock40/res/values-v14/abs__styles.xml:101: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionMode.Title.Inverse'.
[2012-02-25 10:08:19 - SherlockApp] /home/leandros/workspace/ActionBarSherlock40/res/values-v14/abs__styles.xml:105: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionMode.Subtitle.Inverse'.
[2012-02-25 10:08:19 - SherlockApp] /home/leandros/workspace/ActionBarSherlock40/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'.

有任何想法吗?


问题答案:

确保将(和您的ActionBarSherlock项目的)目标API级别设置为15。为此:

  1. 将两个AndroidManifest.xml文件中的android:targetSdkVersion都更改为“ 15”。
  2. 使用项目属性(可能也包括ActionBarSherlock和您的项目)将构建目标更改为“ Android 4.0.3”(或等效的第三方API)。

我没有找到有关此更改的任何文档,但只是通过试用“ n”错误发现了。



 类似资料:
  • 问题内容: 因此,我的设置无法按我想要的方式工作。因此,每当我运行该程序时,它就会立即从0变为100。我尝试使用,任务,并尝试了,但没有任何尝试。 这是我的程序: @MadProgrammer这是我尝试做一名摆动工作人员并将每个名称写入文档并更新进度栏的尝试。该程序将达到86%左右并停止运行,永远不会创建完成的文档。该程序将创建一个空白文档。这是我首先创建的SwingWorker对象,这是两种方法

  • 问题内容: 我在JLayeredpane上有两个JPanels。其中一个显示pdf,重叠的一个具有透明背景(我使用过setOpaque(false))。现在,我可以将图形添加到透明面板中,这样看来我实际上是在注释pdf。我想要一个橡皮擦工具来删除这些注释。我尝试使用以下代码 其中path是由多条线构成的形状。现在,不是在先前的图形上绘制 透明线 ,而是绘制 黑线 。我要去哪里错了? 问题答案: 请

  • 问题内容: 这看起来有效,但无法正常工作。我希望菜单悬停时’huh’div不透明。我尝试了淡入/淡出效果,但效果很好,但只有一次很奇怪。 问题答案: 不带点使用:

  • 问题内容: 我正在编辑从tesseract ocr获得的一些电子邮件。 这是我的代码: 但是输出不正确。 输入: 输出: 但是,当我在每次替换后将结果分配给新的String时,它都能正常工作。为什么在同一字符串中连续分配不起作用? 问题答案: 您将在Javadoc中的String.replaceAll()中注意到,第一个参数是正则表达式。 句点()和管道()以及花括号()都有特殊的含义。您需要对它

  • 问题内容: 我正在编写3D绘画,但在Java中发现了问题。在代码的一部分中,它起作用了: 在另一种情况下,它不起作用: 你能告诉我如何使它工作吗?谢谢在我问之前,是的,它确实执行了那部分代码。 编辑: 哦,现在工作正常,谢谢 问题答案: 代替:

  • 问题内容: array_key_exists不适用于大型多维数组。对于前 array_key_exists(’test’,$ arr)返回’false’,但它可以与一些简单的数组一起使用。 问题答案: array_key_exists不能递归工作(正如MattiVirkkunen指出的那样)。看一下PHP手册,可以使用以下代码来执行递归搜索: