开发者

How safe is to build an app for Android 1.5 devices while targeting Android 1.6 SDK?

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?

Is there anything else I should take care of except just change target SDK?


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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜