简体   繁体   中英

Android SDK Manager - Which Package Should I Choose to Install?

I would like to install the Android SDK, and when the "Android SDK Manager" window appears, I need to choose which Package(s) to install.

The thing is this: My own android phone is Android version 4.2.1 .

The SDK enables to install packages from really old versions, till the latest one: Android v4.4 .

So my question?

Should I choose to install the v4.2 package, like my phone? Should I choose to install the v4.4 package, which is the newest one? Or something else?

And also: What does the package that i choose to install, affects afterwards?

One thing that I completely understand, is that it affects the VM that I can create..

If for example I install a package v4.2, then I will be able to create in the AVD Manager a VM for Android v4.2.. If I choose Package v4.4, then the VM will be v4.4.

So this is clear.

But does my decision regarding which package to install also affect how my app will be compiled?

ie, Will the same source code, be compiled differently If I chose to install the v4.2 package, vs If I chose to install the v4.4 package?

(assume I did not use any v4.4 feature in the code)

Please clarify, I want to chose the right thing...

Thank you very much

I usually choose to install packages API 8 and newest API. In 99% of cases it fits all my needs. To compile application I choose newest api. Even the old phones can handle this. You don't need to install exacly same api package as your phone use. You can use any api you want (but newest is recomended)

Technically you only need to install the SDK Platform files for the minimum API Level you plan to target your App. So if you plan to target your app for ICS (4.0.3) and above, you should at the minimum have the SDK Platform files for API Level 15.

But nothing will happen if you chose to download every single component listed on the SDK Manager. What matters is how you setup your project for your app. In eclipse it's through a wizard, so it's pretty self explanatory.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM