[英]Which Android API to use?
I'm planning on developing Android Apps. 我正计划开发Android应用程序。 I downloaded the SDK and AVD manager, and about to download the SDK platforms.
我下载了SDK和AVD管理器,即将下载SDK平台。
My question is, I want to develop apps for 2.x platform. 我的问题是,我想为2.x平台开发应用程序。 Do I need to download API 7-10?
我需要下载API 7-10吗? Which one to target?
哪一个目标?
Also, if you have tips regarding this, please mention them. 另外,如果您有关于此的提示,请提及它们。 Thank you.
谢谢。
It is not necessary to download all the platforms, just download the latest SDK and make your application compatible with other SDK. 没有必要下载所有平台,只需下载最新的SDK并使您的应用程序与其他SDK兼容。
For that you just need to define android:minSDKVersion and android:maxSDKVersion, android:targetSDKVersion. 为此你只需要定义android:minSDKVersion和android:maxSDKVersion,android:targetSDKVersion。
<uses-sdk android:maxSdkVersion="12"
android:minSdkVersion="8">
</uses-sdk>
Here is a detailed article on " Compatibility " in "Best Practices" section at Android Developer site. 以下是Android开发者网站 “最佳实践”部分中“ 兼容性 ”的详细文章。
In short 简而言之
For 2.1 you have to download API level 7 对于2.1,您必须下载API级别7
For 2.2 you have to download API level 8 对于2.2,您必须下载API级别8
For 2.3 you have following choices to download API levels 对于2.3,您有以下选择来下载API级别
2.3 - 2.3.2 -- API level 9 2.3 - 2.3.2 - API级别9
2.3.3 - 2.3.7 -- API level 10 2.3.3 - 2.3.7 - API级别10
For seeing API levels and Android OS versions you must see : API Levels 要查看API级别和Android操作系统版本,您必须看到: API级别
I recommend you to go through Platform Versions atleast once before you start building any android application. 我建议您在开始构建任何Android应用程序之前至少浏览一次平台版本 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.