I'm building an application, and need to support both 1.5 (Magic and Hero) and 1.6 (Tattoo) devices.
As Android SDK is forward compatible, it seemed logical to build against Android 1.5 SDK, and expect application to work on Tattoo. While that's true, (I tested app, it works ok), I'm now having problems on Android Market.On Tattoo, Market search by default filters android apps that doesn't have explicit support for small screens defined in AndroidManifest.
Problem is that attribute exists only on Android 1.6 SDK, so Building against Android 1.5 SDK is no an option anymore.
How safe is to build App agains A1.6 (with minSdkVersion="3"
) and run it on 1.5开发者_C百科 devices?
Make sure you don't mix up minimum SDK version and target SDK version as these are different options.
For example, I use the following setting in the application for my manifest:
<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4"/>
The documentation says the following about targetSdkVersion
:
In some cases, this allows the application to use manifest elements or behaviors defined in the target API Level, rather than being restricted to using only those defined for the minimum API Level.
So by specifying targetSdkVersion
of 4 but having a minimumSdkVersion
of 3 you'll have an application which should work on 1.5 devices and 1.6 small screen devices.
精彩评论