android different versions compatibility
I have developed an application for android 2.3. Now I want to test it under android 2.1. Do I have to create a new project with target set to android 2.1 and copy all the code across or is there any other method? Also how to make this application compatible with different a开发者_运维知识库ndroid versions as a single program?
Take a look at the documentation on specifying your target version
You'll see that android has a special meaning to the word "target".
But generally you can run your app on any device running android >= minSdkVersion and <= maxSdkVersion
But there's no reason you can't test out your application on any version of android greater than the android:minSdkVersion
you specify.
To do so, just create an AVD (android virtual device) with Android 2.1 (you'll need to install version 2.1 of the SDK to do so) and launch into it.
Otherwise if you've got a physical device running 2.1 you're already set to try it out.
精彩评论