开发者

How to properly add an Android library to a previously made Android project?

I'm trying to add a 2.2 sdk to my project and can't seem to figure out how. I tried adding it as an exte开发者_如何学JAVArnal JAR in the Android sdk folder but ive encountered some errors. How could I add another Android sdk to a previously made Android project?


What you're trying to do is change the SDK version that you're project is targeting. You do not do this by including another jar in your project, you do it by changing the target SDK and minimum SDK for you project. Take a look here on how to do that and for more information:

http://developer.android.com/guide/topics/manifest/uses-sdk-element.html


You can't add an SDK to a project, but you can set your project to use a different SDK. To do this, you need to edit the properties of the project (Right-click on the project head in eclipse, and select "Properties"). You can change the SDK to any that you have downloaded through the eclipse plugin.

Note that if you want to support different levels of SDKs, you need to have your project targeted for the lowest of the two platforms. For instance, if you want your project to be compatible with both 1.6 and 2.2, you need to set your project target SDK to 1.6.

An alternative to this would be to create 2 different versions of your application and release them to market.


its simple

right on properties of a project

select android on left side menu

change the sdk version

thats it......

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜