机器人:使用ActionBarSherlock库 [英] Android : The use of the ActionBarSherlock library

查看:153
本文介绍了机器人:使用ActionBarSherlock库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个将针对旧的Andr​​oid平台上的应用程序(> = 2.x的)。

I want to create an application that will target old Android platforms (>= 2.x).

我发现 ActionBarSherlock ,允许建设的动作条在ICS风格。

I found the ActionBarSherlock that allows building action bars in an ICS style.

但是,当我看到的常见问题解答,我发现,我必须与API级14(4.0编译我的项目: ICS)和目标API级别11在我的清单(3.0:蜂窝)

But, when I read its FAQ, I found that I have to compile my project with the API level 14 (4.0 : ICS) and target the API level 11 in my manifest (3.0 : Honeycomb).

所以,我的问题是:我怎么可以针对2.X版本,ActionBarSherlock

So, my question is : how can I target the 2.x versions with ActionBarSherlock?

推荐答案

这是一个非常普遍的问题,答案是相对简单的。只是因为你的目标4.0,并不意味着它不会在早期版本上运行。在你的清单,你需要添加以下内容:

This is a very common question and the answer is relatively simple. Just because you target 4.0 does not mean it will not run on earlier versions. In your manifest you need to add the following:

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

正如你可以看到这有效地说,你的目标API级别14但是支持的最小API级别为2.1(更新1)。

As you can see this effectively says you are targeting API level 14 however the minimum API level supported is 2.1 (update 1).

这是所有清楚在ABS网站上的文档中解释。如果您想了解更多关于&LT;使用-SDK&GT; 标记然后访问<一个href="http://developer.android.com/guide/topics/manifest/uses-sdk-element.html">http://developer.android.com/guide/topics/manifest/uses-sdk-element.html

This is all clearly explained in the documentation on the ABS site. If you wish to know more about the <uses-sdk> tag then visit http://developer.android.com/guide/topics/manifest/uses-sdk-element.html

这篇关于机器人:使用ActionBarSherlock库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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