1. HUGE Androidforums.com UPDATE! Learn what's new (and download the new app!)
    Dismiss Notice

How to change the minimum version of Android?

Last Updated:

  1. wige

    wige Well-Known Member This Topic's Starter

    Oct 28, 2009
    Likes Received:
    Hi everyone. I have created an application in Eclipse which requires Android 2.0 (or in the manifest minSdkVersion="5"). Since a planned feature that would have required Android 2.0 has been dropped, I want to change the app so that it will work with older devices. Any suggestions on what I need to do to accomplish this?

    Is this simply a matter of creating a new project with the older system specified, and importing the individual files, or are there other gotchas involved that I should be aware of? And, is there an easier way of converting the app by modifying the existing project?

    Any ideas and warning appreciated.

  2. Zero

    Zero Member

    Oct 23, 2009
    Likes Received:
    If you want to target older and newer devices, in the manifest, you should specify the lowest and highest versions of Android you want to target using android:minSdkVersion and android:targetSdkVersion under uses-sdk. Then link the app against the target sdk version (right click project->project properties in eclipse) and test on older version emulators.
  3. dmitriyk

    dmitriyk Active Member

    Apr 17, 2010
    Likes Received:
    Yeah, all you need to do is just change the minSdkVersion line in the manifest file and set the project to compile against another Android version in Eclipse's project preferences. It's under "Android" in there - look around.
  4. Suncat2000

    Suncat2000 New Member

    Jan 23, 2011
    Likes Received:
    Thank the previous posters for suggesting the right area to look in. To clarify, here are some instructions that helped a newbie like me.

    In the root directory of your project is a file named AndroidManifest.xml. This is the file you need to open.

    If you are using Eclipse, opening will bring up the Manifest editor. Under the Manifest Extras control group, you should find a Uses SDK entry. Select it. There is an Attributes for... pane that will let you edit SDK attributes: Min SDK version, Target SDK version, and Max SDK version.

    If you are editing the XML source directly, look for the
    Code (Text):
    1. <uses-sdk android:minSdkVersion="7" />
    entry (mine says 7). Change the value, or remove the entry to clear the attribute.

Share This Page