How to download and add v7-appcompat library manually without SDK Manager

Taher picture Taher · Aug 2, 2015 · Viewed 16.7k times · Source

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)

Answer

Ivan Aksamentov - Drop picture Ivan Aksamentov - Drop · Aug 2, 2015

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