53

Once I have created a project with the Android wizard, how do I change the API Package from say 1.5 to 2.1 ?

I'm not referring to the application xml where the minimum API is set, I'm referring to the jar's included in my project to the Google APIs.

5
  • Just a side note: If it is a consumer app, make sure not to lose compatibility with versions 1.5+, there are still many people using older versions Commented May 31, 2010 at 19:33
  • 1
    @HXCaine Only 6.1% of the market uses a version lower than 2.1, 19.1% of the market uses version 2.2, and 74.4% uses 2.3.3 and higher. link. For those reasons, I wouldnt bother supporting anything less than 2.2, and even then, its probably safe to support 2.3.3 and up since I bet the percentage of people running 2.2 will continue to steadily drop, and the API functionality in 2.3.3 available may be worth the market loss if it means the other 75% of the market likes your app that much more (depends on what your app does) Commented Jun 10, 2012 at 17:07
  • @HXCaine Referencing that same link, just since december 2011 to june 2012, the percentage of users using 2.2 has dropped by more than half. I bet it will drop by half again by december 2012. The more I thnk of it, the more I feel like even 2.2 is no longer relevant for new app development, unless your app doesnt make use of any of the new API functionality in 2.3.3 anyway, in which case, you might as well support 2.2. I still wouldnt bother with going back to 1.6 though. Commented Jun 10, 2012 at 17:17
  • @Zero Yes, I made those comments in May 2010 and things have changed a lot since then! Developers need to look at the statistics and take a decision about which versions they'd like to support Commented Jun 10, 2012 at 17:24
  • @HXCaine Oops, didn't mean to necro the thread. Sorry bout that. Will watch the post dates more carefully. Commented Jun 11, 2012 at 18:03

2 Answers 2

59

Are you using Eclipse for this because you tagged the question with eclipse. If you are using Eclipse just right click on your project select properties now choose android. You should now be able to select another build target. If you want to the API package change the checkbox from 4 to 7.

If you are not using Eclipse and want to use the Android console program use the terminal program android in the following way

android update project -p <path to project> -t <new target api level>
Sign up to request clarification or add additional context in comments.

Comments

48

Using Eclipse, it may not change the SDK version correctly just going right click and properties. Open the manifest file and change the line

<uses-sdk android:minSdkVersion="number-of-version-you-want" />

2 Comments

Even though op said, "I'm not referring to the application xml where the minimum API is set" I'm still giving you a +1 for pointing out where to do this. :)
this answer is much simpler and cleaner than the selected answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.