简体   繁体   中英

Which Android API to use?

I'm planning on developing Android Apps. I downloaded the SDK and AVD manager, and about to download the SDK platforms.

My question is, I want to develop apps for 2.x platform. Do I need to download 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.

For that you just need to define android:minSDKVersion and 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.

In short

For 2.1 you have to download API level 7

For 2.2 you have to download API level 8

For 2.3 you have following choices to download API levels

2.3 - 2.3.2 -- API level 9

2.3.3 - 2.3.7 -- API level 10

For seeing API levels and Android OS versions you must see : API Levels

I recommend you to go through Platform Versions atleast once before you start building any android application.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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