How to run the application in different versions of sdk in android

I am new to Android development. and I have a task to develop an application.

I developed an application and it works fine in android sdk version 2.3.1, but I need to develop it using several versions. I can not find a way to do this.

Please give me any hint or idea to do this.

+4
source share
4 answers

You must change your manifest of your application.

You can read this: http://developer.android.com/guide/topics/manifest/uses-sdk-element.html

and what: http://developer.android.com/guide/appendix/api-levels.html

You must find what you want;)

+2
source

go to Eclipse->Android SDK &AVD Manager . Create multiple AVDs with different versions of the SDK by doing AVD Manager->new->Name->Target(the sdk version)->Create AVD ->strat (by selecting this particular sdk version)

+1
source

In your AndroidManifest.xml, you can install the min sdk version necessary to use your application with: <uses-sdk android:minSdkVersion="3" />

In the properties of your project, which you define on witch SKD, you will create your application (2.3.1 for you).

enter image description here

In AVD Manager you just need to create different devices for testing, you can create a device for each version of the SDK.

0
source

Goto Eclipse -> Window -> Android SDK and AVD Manager. Create some new AVDs with different versions of the SDK.

Run emulators of different versions of the SDK. Now try to run the application. He will ask you to choose an emulator. Choose the one you want.

0
source

Source: https://habr.com/ru/post/1343616/


All Articles