Installing Android Support Repository offline

前端 未结 6 990
星月不相逢
星月不相逢 2021-01-30 17:18

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 down

相关标签:
6条回答
  • 2021-01-30 17:54

    For macOS:

    1. Download android_m2repository_r47.zip
    2. Press command + shift + g from finder and then type

      ~/Library/
      

      And press return

    3. Then go to android/sdk/extras/android
    4. Then extract and save the files under the m2repository folder.
    0 讨论(0)
  • 2021-01-30 17:55

    I ran into this problem for the version of Android 2.3.1 and the android_m2repository_r47 package.

    1. Download android_m2repository_r47.zip manually.
    2. Download xml - https://dl.google.com/android/repository/addon2-1.xml
    3. Copy this 2 files to %\Android Studio\plugins\sdk-updates\offline-repo\
    4. Modify addon2-1.xml: delete all "remotePackage" tags exclude tag with android_m2repository_r47
    5. In Android Studio need add new repository. As URL need to write path to your modificated %\Android Studio\plugins\sdk-updates\offline-repo\addon2-1.xml
    0 讨论(0)
  • 2021-01-30 17:59
    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

    0 讨论(0)
  • 2021-01-30 18:03

    You can put the downloaded zipped file in the Temp folder under the Android SDK (C:\Users\$usrname$\AppData\Local\Android\sdk\temp). Then restart the SDK manager and install it.

    0 讨论(0)
  • 2021-01-30 18:12

    If you have another computer(or friend's computer) that working android studio,

    just copy the sdk folder

    • typically C:\Users\$usrname$\AppData\Local\Android\sdk
    • and need to zipping (too many folders and files in it)

    oops, My first computer os is windows 10 64bit and second computer os is windows 7 32bit

    and sdk trouble occurred

    and I found another solution here

    After 5?minutes the install seemed to go through (not sure though if it just timed out... but at least starting downloading rest of files) ... now stuck on sdk-tools-darwin-###.zip and went through after few minutes... now stuck again at emulator-darwin-4266726.zip, then build_tools_r27-macosx.zip. then on google_m2repository_gms_v11_3_rc05_wear_2_0_5.zip.... and then platform-27-r01.zip and so on... Will report back if it actually still installed everything and works. – armyofda12mnkeys Nov 3 '17 at 18:11

    and I'm happy now

    0 讨论(0)
  • 2021-01-30 18:21

    Try to paste the content of the folder in: Program Files\android\android studio\gradle\m2repository

    I've tried and it worked well:)

    0 讨论(0)
提交回复
热议问题