You are on page 1of 3

Changing Android Target Attribute

This is a workaround for the problem of modernizing an Android app that was originally created with for an older platform and should be changed to a newer SDK. In the following example we change from SDK version 4 to SDK version 10.

1.

Right-click the project in the Package Explorer, select Properties, select Android and then check the desired Project Target.

2.

Edit the following elements in the AndroidManifest.xml file.

<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="10" />


Save the file

3.

Click the Project option on the Eclipses menu bar, select Clean...

4.

Add appropriate Android Libraries. Right-click on project name (Project Explorer). Click on Build Path > Configure Build Path. On the next window click button Add External Jars

5.

Select from the android-sdk/platforms folder the appropriate version you want to apply. SDK-10 in this example, click on the android jar name. Click Open button. Click OK.

6. 7. 8.

Right-click on your project name (Project Explorer). Choose Refresh option. Clean your source code of any remaining problem. Save all files. Run the project again.

You might also like