Android 支持库手册下载

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12382555/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 10:30:05  来源:igfitidea点击:

Android Support Library Manual Download

androidandroid-support-library

提问by Film Creator

Can any one tell me how to install Android Support library manually? Because I have problem with my SDK Manager unable to find required library and also packages need to develop an application. But I could manage with other packages manually now I cant find support libraries to download even official website shows how to download through SDK Manager but not manually. What if SDK Manager doesnt work properly like me?

谁能告诉我如何手动安装Android支持库?因为我的 SDK Manager 有问题,无法找到所需的库,而且包需要开发应用程序。但是我可以手动管理其他包,现在我找不到支持库来下载,即使官方网站显示如何通过 SDK Manager 下载,但不能手动下载。如果 SDK Manager 不能像我一样正常工作怎么办?

回答by styler1972

I have been trying to figure this out ALL DAY LONG. Finally came across the right stuff online and so I'll share with you here.

我一整天都在想办法解决这个问题。终于在网上找到了正确的东西,所以我会在这里与您分享。

Via command line:

通过命令行:

android list sdk -a --extended

You will receive a list of all the valid packages to be downloaded and installed. You might need to adjust your buffer size to see them all. Snippet below

您将收到要下载和安装的所有有效软件包的列表。您可能需要调整缓冲区大小以查看所有内容。下面的片段

----------
id: 84 or "source-14"
     Type: Source
     Desc: Sources for Android SDK, API 14, revision 1
----------
id: 85 or "extra-android-m2repository"
     Type: Extra
     Desc: Android Support Repository, revision 5
           By Android
           Local Maven repository for Support Libraries
           Install path: extras\android\m2repository
----------
id: 86 or "extra-android-support" <-- YOU ELUSIVE SOB
     Type: Extra
     Desc: Android Support Library, revision 19.1
           By Android
           Install path: extras\android\support
----------
id: 87 or "extra-google-admob_ads_sdk"
     Type: Extra
     Desc: Google AdMob Ads SDK, revision 11 (Obsolete)
           By Google Inc.
           AdMob Ads SDK
           Install path: extras\google\admob_ads_sdk
----------
id: 88 or "extra-google-analytics_sdk_v2"
     Type: Extra
     Desc: Google Analytics App Tracking SDK, revision 3
           By Google Inc.
           Analytics App Tracking SDK
           Install path: extras\google\analytics_sdk_v2
----------
id: 89 or "extra-google-gcm"
     Type: Extra
     Desc: Google Cloud Messaging for Android Library, revision 3 (Obsolete)
           By Google Inc.
           GCM library has been moved to Google Play Services

Now:

现在:

android update sdk --no-ui -a --filter "extra-android-m2repository"

Hope this helps someone. I wasted a LOT of time tracking this guy down.

希望这可以帮助某人。我浪费了很多时间来追踪这个人。

回答by R.K

you can directly download from here

你可以直接从这里下载

and then unzip it in the extras folder

然后将其解压到 extras 文件夹中

回答by Padma Kumar

you can find under the Extras in Android SDK manager

您可以在 Android SDK 管理器的 Extras 下找到

after you installed you go to your android SDK (make sure your location)

安装后你去你的android SDK(确保你的位置)

in that you can find the location

因为你可以找到位置

<sdk>/extras/android/support/v4/android-support-v4.jar.

or

或者

 <sdk>/extras/android/compatibility/v4/android-support-v4.jar.
 <sdk>/extras/android/compatibility/v7/gridlayout/
 <sdk>/extras/android/compatibility/v13/android-support-v13.jar.

enter image description here

在此处输入图片说明

回答by Anon

I had a similar problem with downloading the Android Support Repository. I tried downloading the Repository through the SDK Manager in Android Studio. However, the SDK manager could not access certain folders (my SDK was locaated in my C:\ drive and I needed administrator permissions etc etc...).

我在下载 Android Support Repository 时遇到了类似的问题。我尝试通过 Android Studio 中的 SDK Manager 下载 Repository。但是,SDK 管理器无法访问某些文件夹(我的 SDK 位于 C:\ 驱动器中,我需要管理员权限等...)。

I solved it by:

我通过以下方式解决了它:

  1. Launch the Android SDK Tools Setup (you can download this from the developer's website)
  2. Re-install Android SDK Tools (to the same folder).
  3. After step 2 is done, select the launch SDK Manager option before exiting.
  1. 启动 Android SDK Tools Setup(您可以从开发者网站下载)
  2. 重新安装 Android SDK Tools(到同一个文件夹)。
  3. 完成第 2 步后,退出前选择启动 SDK 管理器选项。

The SDK Manager should pop up immediately. You should also see a list of previously installed packages.

SDK 管理器应立即弹出。您还应该看到以前安装的软件包的列表。

  1. Select the package you want and start the download.
  1. 选择您想要的包并开始下载。

link to the SDK tools setup

链接到 SDK 工具设置

Hope this works for you.

希望这对你有用。

回答by Malinda

Direct downloading of android-support-v4.jarthrough SDK manager is no longer exist. Instead, you can use .aar files in the path (\extras\android\m2repository\com\android\support\support-v4) to get the .jar files.

android-support-v4.jar不再存在通过 SDK 管理器直接下载。相反,您可以使用路径 ( \extras\android\m2repository\com\android\support\support-v4)中的 .aar 文件来获取 .jar 文件。

Refer How to convert AAR to JAR

请参阅如何将 AAR 转换为 JAR

Some Background

一些背景

Most of the support libraries are compiled into apps and they are distributed to be consumed by apps through the Google Maven repository. Most of the support libraries are AARs.The AAR file consists of a JAR file and some resource files.

大多数支持库都编译成应用程序,并通过 Google Maven 存储库分发给应用程序使用。大多数支持库都是 AAR。AAR 文件由一个 JAR 文件和一些资源文件组成。

Secondly, You need to get downloaded the google support repository through SDK manager.

其次,您需要通过 SDK 管理器下载 google 支持存储库。