简体   繁体   English

android sdk 20设计库

[英]design library of android sdk 20

I am working on a project which was targeting SDK version 23 but I had to change it to 20 and consequently I have to change com.android.support:appcompat and com.android.support:design 我正在开发一个针对SDK版本23的项目,但我不得不将其更改为20,因此必须更改com.android.support:appcompatcom.android.support:design

I set appcompat to com.android.support:appcompat-v7:20.0.0 and it works fine, but I can not find not what to change design to. 我将appcompat设置为com.android.support:appcompat-v7:20.0.0 ,它可以正常工作,但是我找不到更改design的内容。

Thank you 谢谢

As explained in Picking your compileSdkVersion, minSdkVersion, and targetSdkVersion blog post : 选择您的compileSdkVersion,minSdkVersion和targetSdkVersion博客文章中所述

Therefore it is strongly recommended that you always compile with the latest SDK. 因此,强烈建议您始终使用最新的SDK进行编译。 You'll get all the benefits of new compilation checks on existing code, avoid newly deprecated APIs, and be ready to use new APIs. 您将获得对现有代码进行新编译检查的所有好处,避免使用新近弃用的API,并准备使用新的API。

Note that if you use the Support Library, compiling with the latest SDK is a requirement for using the latest Support Library releases. 请注意,如果您使用支持库,用最新的SDK编译是采用了最新的支持库版本的要求

There is no Design Library prior to 23.0.0, so you must compile with API 23. 23.0.0之前没有设计库,因此您必须使用API​​ 23进行编译。

However, the blog also says: 但是,博客还说:

It should be emphasized that changing your compileSdkVersion does not change runtime behavior. 应该强调的是, 更改compileSdkVersion不会更改运行时行为。

You can target a lower SDK version than you compile with, allowing you to (conditionally) use new APIs and use new versions of the Support Library, while keeping the compatibility modes controlled by targetSdkVersion at a lower SDK. 您可以定位比编译时更低的SDK版本,从而(有条件地)使用新的API和使用支持库的新版本,同时将targetSdkVersion控制的兼容模式保持在较低的SDK中。

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

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