简体   繁体   English

如何在SDK中获取Android Support Library 20修订版

[英]How to get Android Support library 20 revision in sdk

I'm using Android Studio. 我正在使用Android Studio。 Everything was going good but I updated Android support library to 22 revision and my application UI is changed and In some Activities app is crash. 一切进展顺利,但是我将Android支持库更新为22版本,并且我的应用程序UI更改了,并且在某些“活动”应用程序中崩溃了。

I want to downgrade the version of Android support library from 22 revision to 20 revision in SDK so I uninstalled Android support library but when I install it every time 22 revision is installed. 我想将Android支持库的版本从SDK中的22版本降级到20版本,所以我卸载了Android支持库,但是每次安装22版本时都安装了它。

How can I install 20 revision of Android support library? 如何安装20版本的Android支持库?

You can check inside the sdk folder in your pc. 您可以在PC的sdk文件夹中检查。

 androidsdk\extras\android\m2repository\com\android\support

For each support library you will find all versions available. 对于每个支持库,您将找到所有可用版本。

compile 'com.android.support:support-v4:19.1.0'
compile 'com.android.support:support-v4:20.0.0'
compile 'com.android.support:support-v4:21.0.3'

Pay attention. 请注意。 If you use the v20+, you have to use the api 21+ to compile your project. 如果使用v20 +,则必须使用api 21+来编译项目。

In your app's module there is a build.gradle file. 在您应用的模块中,有一个build.gradle文件。 Inside that you will see something like: 在其中,您将看到类似以下内容的内容:

compile 'com.android.support:support-v4:xx.x.x'

This is how you dictate which support library is used when compiling the app. 这是您指示在编译应用程序时使用哪个支持库的方式。 You will need to have the version you choose installed in your SDK manager. 您需要在SDK管理器中安装选择的版本。

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

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