4

I checked this link to:

https://developer.android.com/tools/support-library/setup.html

It says I should use SDK manager to download and add v7-appcompat, however I have to connect to internet through proxy and when I use SDK manager it cannot download anything.

So how can I download and add v7-appcompat?

I KNOW HOW TO USE PROXY, BUT PROXY MAKE MY INTERNET SPEED WORSE, SO SKD MANAGER GET TIMED OUT MESSAGE.

(I want to use material design, but when I use this theme: Theme.AppCompat.Light.DarkActionBar it connot resolve it, I checked through web and I find out I need to add v7-appcompat and there is not any folder like extras\android\support)

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Taher
  • 1,185
  • 3
  • 18
  • 36

2 Answers2

6

Manual download steps:

  • Run SDK manager at least once after installation, so it would create its config folder.
  • Find .android folder in your home folder (~ on *nix, C:\Users\<username> on Windows)
  • Open sites-settings.cfg
  • Pick a repository string that will likely contain your package (repo names after = sign could give you a clue). In your case it will be:

    @name@https\://dl.google.com/android/repository/addon-6.xml=Google Inc.
    
  • Paste picked URL into a browser address bar:

    https://dl.google.com/android/repository/addon-6.xml
    
  • You will see an XML file that describes downloads available in the repository. We are interested in:

    <sdk:name-display>Android Support Library</sdk:name-display>
    
  • Just below you could find a direct download URL.

    <sdk:url>support_r19.1.zip</sdk:url>
    
  • Now, it can be absolute path or relative path. In our case it is relative path. Just add the absolute current path before it. We are now on:

    https://dl.google.com/android/repository/
    

    so, the link will be

    https://dl.google.com/android/repository/support_r19.1.zip
    
  • If you don't find desired files, just try another repository

Note, that in mainland China https://dl.google.com may be blocked. You will to find a solution to this problem yourself ;)

Ivan Aksamentov - Drop
  • 12,860
  • 3
  • 34
  • 61
0

I was missing:

allprojects {
    repositories {
        maven {url "https://maven.google.com"}
    }
}

in my project level gradle file. Added this and it worked like charm.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Deepak Vajpayee
  • 348
  • 2
  • 4
  • 15