29

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?

Tyler
  • 19,113
  • 19
  • 94
  • 151
Film Creator
  • 375
  • 1
  • 5
  • 11

5 Answers5

43

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.

gardarh
  • 3,084
  • 2
  • 28
  • 31
Tyler
  • 19,113
  • 19
  • 94
  • 151
  • 1
    Well, you really helped me, i can't find the Android support Library item in SDK manager, only this command helps. Thank you. – Songlin Nov 09 '14 at 14:00
  • Saved my life. I am on a mac, and the SDK manager won't show that an update is available for the support library. – Yaron Levi May 21 '16 at 23:31
  • 1
    extra-android-support appears to be obsoleted as of support library version 23.2.1, use extra-android-m2repository instead. Edited post to reflect this. – gardarh Aug 15 '16 at 11:41
13

you can directly download from here

and then unzip it in the extras folder

R.K
  • 1,721
  • 17
  • 22
10

you can find under the Extras in Android SDK manager

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

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

Padma Kumar
  • 19,893
  • 17
  • 73
  • 130
  • 1
    I dont even find Extras folder in android as you said.Like i said before i managed all others like Platforms,Platform tools and so by my self not by SDK manager. – Film Creator Sep 12 '12 at 08:46
  • @FilmCreator that's y I asked you to make sure you location might be possible of you have different android SDK folders. – Padma Kumar Sep 12 '12 at 08:48
  • But as i knew i never downloaded Support libraries by my notice atleast,so how come they r there??Is there any posibility to download them manually,I mean without using SDK Manager. – Film Creator Sep 12 '12 at 08:57
  • It is no longer there unless you select OBSOLETE at least as of July 2016 – Brian Reinhold Jul 09 '16 at 11:56
  • @Brain2000 I can not see an option in SDK Manager to download android support libs, But I can see, there is a option to download android support repository. As you said, it must be obsoleted. Is there an optional way to download `android-support-v4.jar`? (I am using android studio v 3) – Malinda Nov 09 '17 at 15:46
2

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...).

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.

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

  1. Select the package you want and start the download.

link to the SDK tools setup

Hope this works for you.

Anon
  • 21
  • 1
2

Direct downloading of android-support-v4.jar through 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.

Refer How to convert AAR to 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.

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

Malinda
  • 336
  • 2
  • 12