Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Android Support Repository offline

I am trying to setup Android Studio + Android SDK on Linux. I was able to setup Android Studio and SDK Tools and other components except "Android Support Repository" (The download kept failing) so I downloaded android_m2repository_r30.zip and tried to place its contents(which is a directory m2repository) in the SDK directory tree but it is not recognized.

I have tried placing in several paths including

pathtosdk/extras/android/m2repository , pathtosdk/extras/android/support/m2repository

and

pathtosdk/extras/support/m2repository

But none of them works. Where should I place the contents of the zip file to have it installed.

like image 693
R Singh Avatar asked Apr 29 '16 10:04

R Singh


People also ask

How do I install support library?

Downloading the Support LibrariesStart the android SDK Manager. In the SDK Manager window, scroll to the end of the Packages list, find the Extras folder. Select the Android Support Library item. Click the Install packages button.

Can I install Android studio offline?

Yes, but it will limit various features. To use Gradle offline when building with Android Studio, proceed as follows: Open the Preferences window by clicking File > Settings (on Mac, Android Studio > Preferences). In the left pane, click Build, Execution, Deployment > Gradle.

Which v7 support libraries are used for modifying UI settings?

v7 Preference Support Library The preference package provides APIs to support adding preference objects, such as CheckBoxPreference and ListPreference , for users to modify UI settings. The v7 Preference library adds support for interfaces, such as Preference. OnPreferenceChangeListener and Preference.


1 Answers

  1. Download the latest support repository.
    Here is the link for version v47
    To get the most recent version check out the update below
  2. Extract the downloaded zip file.

  3. Copy the folder named m2repository from the extracted folder.

  4. Navigate to extras/android directory in your SDK installation directory. For me it's:
    C:\Users\$usrname$\AppData\Local\Android\sdk\extras\android\

  5. Replace the existing m2repository folder with the one from the ZIP.
    (I suggest creating a backup first)

  6. Restart Android studio.

Hopefully you will have the newer Android support repository.

Update

To get the latest version of support repository:

a. Go to this link

b. Search for the keyword m2repository_r

c. Copy the value in <url> tag.
It should look like this:

 <complete>     <size>355529608</size>     <checksum>a0d22beacc106a6977321f2b07d692ce4979e96a</checksum>     <url>android_m2repository_rXX.zip</url>  </complete> 

d. Paste it to the end of this URL: https://dl.google.com/android/repository/
Your new URL should look like this:
https://dl.google.com/android/repository/android_m2repository_rXX.zip
where XX is the version number

e. Download and continue from step 2

like image 86
Vipul Purohit Avatar answered Sep 18 '22 21:09

Vipul Purohit