简体   繁体   English

要使用哪种Android API?

[英]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.

相关问题 从URL下载android 2.2中的5-40 MB数据文件。 开发使用哪些类? - Download data file 5-40 MB in android 2.2 from URL. Which classes to use for development? 决定支持哪个Android API版本的因素(内部应用程序) - Factors when deciding which Android API version to support (in-house application) cordova-android ./create $(其中android)以1退出 - cordova-android ./create $( which android ) exited with a 1 哪个版本的Android SDK支持在哪个Java版本中进行编码? - Which versions of Android SDK support coding in which versions of Java? Android工作室中的Android 2.2 api等级8 - Android 2.2 api level 8 in android studio Android在Android 2.2中使用片段时遇到问题 - android facing problems to use fragments in android 2.2 没有异步任务的Android web api调用 - Android web api call without asynctask Android Froyo(API 8)上的底部操作栏 - Bottom action bar on android froyo (api 8) Android多个联系人选择器(可选择选择哪个电话号码) - Android Multiple Contacts Chooser (with option of choosing which phone number) 如何确定要开发哪种Android风格的应用程序? - How do decide which flavor of Android to develop an app for?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM