开发者

Can I change the platform version of an android app after creating it?

开发者 https://www.devze.com 2023-03-10 19:06 出处:网络
I am just learning about android app development and have created my first app which is a relatively simple app with a link to a gallery of images and some text pages. I created开发者_如何学编程 this

I am just learning about android app development and have created my first app which is a relatively simple app with a link to a gallery of images and some text pages. I created开发者_如何学编程 this using the 1.5 platform as it seemed sensible to make it backwards compatible. I've been testing it on 3.0 and it comes up tiny on the screen and I have since learnt I need to use supports-screens and other related commands to allow variable screen support which from what i read is only available in 1.6 and above. As a result I need to change the app platform to 1.6 or above and my questions are as follows:

1) Am I able to just go to project properties and change the platform version tickbox to a newer one (in this case 1.6)? As I tried this with the project but the supports-screens tag still gives an error (which it doesn't when I create a brand new project)?

2) What version should I be creating it in these days for ideal backwards compatibility but able to use most desirable features? I understand 1.6 includes a lot of the newer functionality but according to http://developer.android.com/resources/dashboard/platform-versions.html only about 4% of people are using less than 2.1 so is it better to just code using 2.1 (assuming I want to target mobiles and tablets)?

Thanks so much for your help as ever,

Dave


  1. Take a look at this. It explains how you can go about changing your AndroidManifest.xml to specify which version of the SDK to use. You may also need to update default.properties to point the target to the proper api value.
  2. This really depends on what you want to do. If you require something from 2.1 or 3.0, then I think you need to go with that. But if you can get by using just 1.6 and still have all the functionality that you need/want, then I would definitely recommend using 1.6.
0

精彩评论

暂无评论...
验证码 换一张
取 消