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.
来源:https://stackoverflow.com/questions/7708847/which-android-api-to-use