开发者

Android Set up Question - Which API Level do I Install?

开发者 https://www.devze.com 2022-12-30 04:53 出处:网络
I\'m trying to set up the Android SDK on Ubun开发者_C百科tu.Someday I want to make apps that can reach most of the market.

I'm trying to set up the Android SDK on Ubun开发者_C百科tu. Someday I want to make apps that can reach most of the market.

I've heard I need to make the apps compatible with Android 1.6 for this. Does that mean everything I install should be for Android 1.6 (API level 4?). Will I have any trouble running the apps on my phone with is Android 2.1?


If you want an Android 1.6 device to be able to run your application, you must only use functionality in API Level 4 (Android 1.6). Android is forward-portable, so your 2.1 (and 2.2) device will run 1.6 code without any issues.

You can of course install all the API bundles, which will allow you to test on newer firmware on a variety of devices. In my experience, making sure the application behaves well with both on screen and hardware keyboards is the biggest problem in terms of UI layout. The simulator will allow you to test both configurations easily.


You should also consider targeting 1.5 not 1.6. Because about 30% of all Android devices are 1.5 http://android-developers.blogspot.com/2009/12/knowing-is-half-battle.html.


Android Currently has 3 major versions running.

Android Platform | Percent of Devices

  • Android 1.5 | 37.2%
  • Android 1.6 | 29.4%
  • Android 2.1 | 32.4%

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

You will notice that 1.6 is the smallest in the top 3 , thus I suggest ( and what I have done) is you only install

  • 1.5 to support the older phones
  • 2.1 as your mainstay because not only does it have more features but also the share for 2.1 is slowly but surely going to increase as all phones get the 2.1 upgrade


I would recommend using this in your manifest:

<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4" />

It will make it work for people using 1.5 and it will look fine on new devices.

0

精彩评论

暂无评论...
验证码 换一张
取 消