简体   繁体   English

Android最低应用程式SDK,编译和相容性问题所需的SDK

[英]Android minimum app sdk, required sdks for compilation and compatibility issues

I'm new to android and i want make some things clear about some confusions: 我是android的新手,我想澄清一些困惑:

If i set my new android application to a minimum sdk version to 4.0.3 (api 15) should i install all sdks between that version and the latest one ? 如果我将新的android应用程序的最低SDK版本设置为4.0.3(API 15),是否应该在该版本和最新版本之间安装所有SDK? Or should i just install the sdk level same the device/emulator i will use for testing has as plateform version? 还是我应该仅将用于测试的设备/仿真器的sdk级别安装为平台版本?

What about when i will generate the final apk for the appstore which will be supposed to work in all android platform versions starting from the min sdk i've targeted ? 那我什么时候才能为appstore生成最终的apk,该apk应该可以在从我定位的最低SDK开始的所有android平台版本中使用?

i was reading about the Android Support Library and i guess it should be always part of the latest sdk. 我正在阅读有关Android支持库的信息,我想它应该始终是最新SDK的一部分。 if i use it on my application should i still have earlier sdk versions installed for the compilation ? 如果我在应用程序上使用它,是否仍应安装较早的SDK版本进行编译? Won't i never need anymore packages from earlier API version once i use the support library ? 使用支持库后,我将不再需要API早期版本的软件包吗?

Best regards. 最好的祝福。

You do not need the SDK for the minimum version. 最低版本不需要SDK。 You only need to work with the SDK of the Target/Maximum version. 您只需要使用Target / Maximum版本的SDK。

Download the platform tools and platform through the SDK manager for the Target API version. 通过SDK管理器下载目标API版本的平台工具和平台。 And if you use features that are not available in the minimum version, use Android Support Libraries. 并且,如果您使用的是最低版本不提供的功能,请使用Android支持库。

The purpose of setting your Minimum SDK is to let devices know if they'll be able to run the code based on what SDK they're using. 设置最低SDK的目的是让设备知道它们是否能够根据所使用的SDK运行代码。 You don't need to have all versions of the SDK, just the most recent one that you're developing for. 您不需要拥有所有版本的SDK,只需拥有要开发的最新版本即可。 If you're using Android Development Studio, it will warn you if a feature you're trying to implement is not supported by the Minimum SDK you've set for the project. 如果您使用的是Android Development Studio,则为项目设置的最低SDK不支持您尝试实现的功能时会发出警告。

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

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