简体   繁体   English

开始为 Android 开发,我应该选择安装哪些 SDK?

[英]Starting to develop for Android, what SDK(s) should i choose to install?

I'm starting to broad my developer skills also to the Android development.我也开始将我的开发人员技能扩展到 Android 开发。

I installed all the tools and configurations and every thing seem great, As a default settings I install the 3.2 SDK, but there is not too much docs on that one, mode of what is out there is on the 2.x SDKs.我安装了所有工具和配置,一切看起来都很棒,作为默认设置,我安装了 3.2 SDK,但是那个没有太多文档,2.x SDK 上的模式。

Is it like IOS, does android have a good backward computability?是不是像IOS,android有很好的后向计算能力吗? Can I stay with the 3.x and count on it (with the features that are in the 2.x SDKs) to work on 2.x phones?我可以继续使用 3.x 并依靠它(具有 2.x SDK 中的功能)在 2.x 手机上工作吗? What are the common version in the Android devices this days?现在的 Android 设备中的通用版本是什么? I have lots of newbie develop questions like that, as i want to start from a good starting point and there are lots of materials and tutorials over the web that are not up to date.我有很多这样的新手开发问题,因为我想从一个好的起点开始,并且有很多关于 web 的材料和教程都不是最新的。

Also, does any one know about a good site for this kind of Q&A?另外,有人知道这种问答的好网站吗?

Thank you, Erez谢谢你,埃雷兹

As of July 5th the version with the largest market share (59.4%) is 2.2 (API Level 8) as shown here http://developer.android.com/resources/dashboard/platform-versions.html so Consequently I would recommend using that as a starting point unless you are solely focusing on the new honeycomb tablets (<1% market share). As of July 5th the version with the largest market share (59.4%) is 2.2 (API Level 8) as shown here http://developer.android.com/resources/dashboard/platform-versions.html so Consequently I would recommend using除非您只专注于新的蜂窝平板电脑(<1% 的市场份额),否则以此为起点。

As for backward compatibility, android is completely backward compatible for the most part.至于向后兼容,android在很大程度上是完全向后兼容的。 Unless of course you use a new feature that is only available starting with a certain API level.当然,除非您使用仅从某个 API 级别开始才可用的新功能。 Google's Android market is good about only allowing apps that will run on a certain API being visible to that phones user.谷歌的 Android 市场很好地只允许该手机用户可以看到将在某个 API 上运行的应用程序。 This is enforced by the API level as recorded in the manifest file that is created with every Android app and set by the developer.这是由 API 级别强制执行的,该级别记录在使用每个 Android 应用程序创建并由开发人员设置的清单文件中。

To help you with the API level, the SDK docs show what API a feature/object started with in the upper left hand corner.为了帮助您了解 API 级别,SDK 文档在左上角显示了 API 功能/对象的开头。 You can also view the specific changes in each platform and it's corresponding API level at http://developer.android.com/sdk/index.html . You can also view the specific changes in each platform and it's corresponding API level at http://developer.android.com/sdk/index.html .

As for a good website to get started I would recommend the developer site at developer.android.com and this website of course.至于一个好的入门网站,我会推荐开发者网站 developer.android.com 和这个网站。 Also the book Android Wireless Application Development by Shane Conder and Lauren Darcey (2 ed) Is very good. Shane Conder 和 Lauren Darcey 所著的 Android Wireless Application Development 一书(2 版)也非常好。 (I am not connected with the book just currently reading it). (我与目前正在阅读的这本书没有联系)。 Make sure you get the latest edition.确保您获得最新版本。

Hope this helps, George希望这会有所帮助,乔治

Above is good info, but it would be advisable to develop for 2.1 and up at the moment, considering as of this answer's writing, 2.1 makes up 17.5% of the market and 2.2 makes up 59.4% of the market.以上是很好的信息,但考虑到在撰写此答案时,2.1 占市场的 17.5%,2.2 占市场的 59.4%,因此建议目前为 2.1 及更高版本开发。

http://developer.android.com/resources/dashboard/platform-versions.htmlhttp://developer.android.com/resources/dashboard/platform-versions.html

OP should also be advised that version 3.x is specifically for tablets, so that may not be the best choice for a starting developer.还应告知 OP,版本 3.x 专门用于平板电脑,因此对于初学者来说,这可能不是最佳选择。 My advice is to go with 2.1.我的建议是 go 与 2.1。 Most of the documentation is up to date with that, and you won't have access to things you don't need yet (fragments, tablet-specific things)大多数文档都是最新的,您将无法访问您不需要的东西(片段,特定于平板电脑的东西)

Hope this helps!希望这可以帮助!

You can read about application forward and backward compatibility in the docs.您可以在文档中阅读有关应用程序向前和向后兼容性的信息。

Generally apps are forwards compatible but not backward compatible - new APIs introduced in one version are not available in an older version.通常应用程序向前兼容但不向后兼容——一个版本中引入的新 API 在旧版本中不可用。

This pie chart shows distribution of devices accessing the Android Market and based on this I would try to target devices using 2.1 or newer to cover most of your users.此饼图显示了访问 Android 市场的设备的分布情况,基于此,我将尝试使用 2.1 或更高版本的设备来覆盖您的大多数用户。

Your decision should be based on whether you need a feature introduced in a specific version.您的决定应基于您是否需要在特定版本中引入的功能。 For example, if you want to add NFC to your app, you'll need Android 2.3.3 or newer, but otherwise there's no reason to exclude older devices.例如,如果您想将 NFC 添加到您的应用程序,您将需要 Android 2.3.3 或更高版本,否则没有理由排除旧设备。

I recommend learning about Fragments and using the compatibility package to use them on targets below 3.0.我建议了解 Fragments 并使用兼容性 package在 3.0 以下的目标上使用它们。 This will make it easier to reuse view elements on both tablet and phone devices.这将使在平板电脑和手机设备上重用视图元素变得更加容易。 Note that if you only intend to develop for phones, 2.3.4 is the latest phone version of Android at the time of writing.请注意,如果您只打算为手机开发,2.3.4 是撰写本文时 Android 的最新手机版本。 Later this year, 3.0 for tablets will merge with the phone version to provide a unified OS version as with iOS.今年晚些时候,平板电脑 3.0 将与手机版本合并,以提供与 iOS 一样的统一操作系统版本。

Android 3.2 is just released publicly on friday, July 15th. Android 3.2 刚刚于 7 月 15 日星期五公开发布。 You can start-off with Android 2.3.3 and 3.2 installation and development.您可以从 Android 2.3.3 和 3.2 安装和开发开始。

Android applications are mostly forward compatible. Android 应用程序大多是向前兼容的。 (But not always) The best place to find all your answers is developer.android.com (但并非总是如此)找到所有答案的最佳位置是 developer.android.com

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM