简体   繁体   English

Android SDK Manager-我应该选择安装哪个软件包?

[英]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. 我想安装Android SDK,并且在出现“ Android SDK Manager”窗口时,我需要选择要安装的软件包。

The thing is this: My own android phone is Android version 4.2.1 . 事情是这样的:我自己的android手机是Android版本4.2.1

The SDK enables to install packages from really old versions, till the latest one: Android v4.4 . 通过SDK,您可以从真正的旧版本安装软件包,直到最新版本:Android v4.4

So my question? 那我的问题呢?

Should I choose to install the v4.2 package, like my phone? 我应该选择像手机一样安装v4.2软件包吗? Should I choose to install the v4.4 package, which is the newest one? 我应该选择安装最新的v4.4软件包吗? 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.. 我完全理解的一件事是,它影响了我可以创建的VM。

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. 例如,如果我安装了软件包v4.2,则可以在AVD Manager中创建Android v4.2的虚拟机。如果选择软件包v4.4,则该虚拟机将为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? 即,如果我选择安装v4.2软件包,而我选择安装v4.4软件包,则相同的源代码会以不同的方式编译吗?

(assume I did not use any v4.4 feature in the code) (假设我没有在代码中使用任何v4.4功能)

Please clarify, I want to chose the right thing... 请澄清一下,我想选择正确的东西...

Thank you very much 非常感谢你

I usually choose to install packages API 8 and newest API. 我通常选择安装软件包API 8和最新的API。 In 99% of cases it fits all my needs. 在99%的情况下,它可以满足我的所有需求。 To compile application I choose newest api. 要编译应用程序,我选择了最新的api。 Even the old phones can handle this. 即使是旧手机也可以处理。 You don't need to install exacly same api package as your phone use. 您不需要安装与手机使用完全相同的api软件包。 You can use any api you want (but newest is recomended) 您可以使用任何想要的api(但建议使用最新的api)

Technically you only need to install the SDK Platform files for the minimum API Level you plan to target your App. 从技术上讲,您只需要安装SDK平台文件即可获得计划针对应用程序的最低API级别。 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. 因此,如果您打算将应用定位为ICS(4.0.3)及更高版本,则至少应具有API级别15的SDK平台文件。

But nothing will happen if you chose to download every single component listed on the SDK Manager. 但是,如果您选择下载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. 在日食中,它是通过向导进行的,因此很容易解释。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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