English 中文(简体)
which android sdk version to release to market?
原标题:

I want to release an app on the market. It uses nothing new from the 2.0 release like bluetooth for instance and it works well in every emulator using version 1.6 to 2.1.

My question is upon version of the sdk should I distribute my application to make it compatible with all devices running 1.6, 2.0 or 2.1?

I only have a physical device running 1.6 to test it, but as I say, it uses nothing fancy and works well on emulators using API levels 4, 5, 6 or 7.

Thanks

最佳回答

The answers here are good, but here are some more suggestions:

  • don t set android:maxSdkVersion unless you are absolutely sure you need it.
  • set android:minSdkVersion to 3 so Cupcake devices can run it.
  • set android:targetSdkVersion to 4 to indicate the app has been tested on Donut.

Your app should then work well on all >= Cupcake devices. If you have plans to provide high-density resources for high-density screens (Droid, Nexus One), there s a little more work you have to do. It d be better to start another thread for this, but long story short, you d put the high-density resources in a folder called drawable-hdpi-v4.

Be sure to check out the uses-sdk doc.

问题回答

I d test with 1.5 and put android:minSdkVersion="3" Based on this there are still lot s of devices 1.5 http://developer.android.com/resources/dashboard/platform-versions.html

If your app is doing nothing fancy, uses nothing that has been deprecated/changed/added between these versions and works on the respective emulators, then you should be fine.

Just restrict it to 2.1 as an upper limit using the android:maxSdkVersion="7" — you can always update as and when the next SDK comes out.

I believe that anything written in previous versions of the SDK are fully compatible with the latest version.

I m sure i read this in the SDK documentation when i was setting up my IDE.

If i m correct then there is really no need to update your application to make use of the added features, although the option will always be there if you decide to expand upon it.

In my opinion the best practice is to compile with the Android 1.6 sdk and set the minSdkVersion to 3 in the manifest.

I say this based off of the recommendation of Dianne Hackborn (the user named hackbod that commented on the accepted answer) in this thread, she is a Google employee that works on the Android source itself.

Basically there are quite a few Android 1.5 SDK devices out there so compiling with the Android 1.5 SDK would provide support for more devices with the 1.5 SDK, 1.6 SDK, 2.0 SDK, or the 2.1 SDK but there are devices that require the 1.6 SDK such as the HTC Tattoo so compiling you app with the 1.6 sdk but setting the minSdkVersion to 3 allows for the majority of devices to be able to use your app.

If you do as the accepted answer says and compile with the latest 2.1 SDK then you are missing out on a large amount of users. Applications compiled with the 2.1 SDK can only be used by devices that have the 2.1 SDK or higher so basically you are limiting your users to those that own a Google Nexus One at the moment.





相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签