ActionBarSherlock 4.0不起作用。但是3.5.1做 [英] ActionBarSherlock 4.0 doesn't work. But 3.5.1 do

查看:278
本文介绍了ActionBarSherlock 4.0不起作用。但是3.5.1做的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我用ActionBarSherlock 3.5.1一切都很好,workes。但是,如果我想使用4.0 RC1我的错误。

If I use ActionBarSherlock 3.5.1 everything is fine and workes. But if I want to use 4.0 RC1 I got errors.

[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'.

任何想法?

推荐答案

请务必设置目标API级别(无论是ActionBarSherlock项目和你的)到15要做到这一点:

Be sure to set the Target API Level (of both the ActionBarSherlock project and yours) to 15. To do this:

  1. 更改Android的:在这两个AndroidManifest.xml中的文件targetSdkVersion为15
  2. (包括ActionBarSherlock和你的项目很可能也)更改构建目标使用项目属性的Andr​​oid 4.0.3(或等效的第3方API)。

我认为这没有任何改变的文件,而只是发现通过试验'N'的错误。

I didn't find any documentation of this change, but just found out by trial 'n' error.

这篇关于ActionBarSherlock 4.0不起作用。但是3.5.1做的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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