简体   繁体   English

第一个Android应用。 我应该使用蜂窝的2.3.3版本吗?

[英]First android app. Should I use the 2.3.3 version of the honeycomb?

So I`m about to write my first android app. 所以我即将编写我的第一个Android应用程序。 I want it to be able to run on a handset but also on a tablet. 我希望它能够在手机上运行,​​也可以在平板电脑上运行。

My question is, when I create an Android in Eclipse, which SDK should I choose? 我的问题是,当我在Eclipse中创建一个Android时,我应该选择哪个SDK? My initial thought is to write with 2.3.3 SDK. 我最初的想法是用2.3.3 SDK编写。 I imagine I should be able to run it on honeycomb as well, or I will have to write the same app but using the 3.0 SDK? 我想我也应该可以在蜂窝上运行它,或者我必须使用3.0 SDK编写相同的应用程序?

I'd recommend that you target Android 2.1 unless you really need some API that is introduced in a newer version. 我建议您定位Android 2.1,除非您确实需要在较新版本中引入的某些API。 This targets almost all users (tablet, etc. will be able to run it too). 几乎针对所有用户 (平板电脑等也可以运行它)。 If you want to take advantage of the bigger screen of tablets in different layouts, you can use Fragments from the compatibility library . 如果您想利用不同布局中更大的平板电脑屏幕,可以使用兼容性库中的 片段

If you use the android Support Package , you should be able to build against android versions all the way down to 1.6 and still support tablets. 如果你使用Android 支持包 ,你应该能够建立针对Android版本一直到1.6并仍然支持平板电脑。 You can write a single application and support all devices from 1.6 and up (including tablets). 您可以编写单个应用程序并支持1.6及更高版本的所有设备(包括平板电脑)。 I generally write applications that target 2.1, since that's the lowest version number that still has a significant market share . 我通常会编写以2.1为目标的应用程序,因为这是仍然具有重要市场份额的最低版本号。 By using the Support Package, I can write a single application that is accessible by the vast majority of the android market and still works on the latest and greatest as well as uses some of the features that weren't introduced to the API until much later than 2.1. 通过使用支持包,我可以编写一个可以被绝大多数Android市场访问的应用程序,并且仍然可以使用最新和最好的应用程序,并使用一些未在API中引入的功能。比2.1。

Take a look at this statistics: http://developer.android.com/resources/dashboard/platform-versions.html 看看这个统计数据: http//developer.android.com/resources/dashboard/platform-versions.html

I would suggest to use version 2.2 我建议使用2.2版

It all depends on the features that you want to utilize in your app. 这完全取决于您希望在应用中使用的功能。 There are three settings that you can set in the application manifest after creating your app: 创建应用后,您可以在应用程序清单中设置三个设置:

<uses-sdk android:minSdkVersion="integer" 
      android:targetSdkVersion="integer"
      android:maxSdkVersion="integer" />

These allow you to control what OS version your app will be available on. 这些允许您控制应用程序可用的操作系统版本。 A rule of thumb for now is that most apps are workable on future versions of the OS. 现在的经验法则是,大多数应用程序都适用于未来版本的操作系统。 For example, an app developed for 2.1 will work on 3.0, but you will not be able to utilize and 3.0-specific features in your app then. 例如,为2.1开发的应用程序将在3.0上运行,但您将无法在应用程序中使用3.0特定功能。

Check out uses-sdk 看看用途-sdk

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我正在写我的第一个Android应用程序。 我的.gitignore应该是什么样? - I'm writing my first Android app. What should my .gitignore look like? 我应该将哪个Eclipse版本用于Android应用程序? - Which Eclipse version should I use for an Android app? Android Honeycomb中的BlueZ版本 - BlueZ version in Android Honeycomb Android Studio 在旧的 API 版本 (21) 上创建了第二个“第一个片段”,我应该使用哪个? - Android Studio created a second “first fragment” on an older API version (21), which should i use? 开始我的第一个Android应用程序 如何轻松测试服务器是否收到消息? - Starting my first android app. How can I easily test if the server has received a message? 将新的APK上传到生产环境。 适用于新版本的Android应用。 - Uploading a new APK to production. For new version of an Android app. 如何轻松地将现有的Android应用程序适应Honeycomb? - How can I easily adapt my existing Android app to Honeycomb? 在Nativescript应用中设置受支持的最低受支持的Android版本。 - Set the supported lowest supported Android version in a Nativescript app. 我应该使用哪个JDK来编译我的Android应用程序以及哪个版本? - Which JDK should I use to compile my Android app with and which version? 为什么我不能在Android HoneyComb Acer Iconia上使用USB调试 - Why I cant use USB Debugging on Android HoneyComb Acer Iconia
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM