1. 2015 is going to be a great year for Android! Why wait??
    Samsung Galaxy Note 5 | Samsung Galaxy S6 | HTC One M9
  2. New Forum Created: Samsung Gear VR!

How to change the minimum version of Android?


  1. wige

    wige Well-Known Member

    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.

    Advertisement
    :
  2. Zero

    Zero Member

    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

    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

    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):
    <uses-sdk android:minSdkVersion="7" />
    entry (mine says 7). Change the value, or remove the entry to clear the attribute.
Loading...

Share This Page