J.Mod
J.Mod

Reputation: 1

How to install android support repository offline

I'm trying to compile this library :

compile 'com.android.support.constraint:constraint-layout:1.0.1'

but this error showing up:

Error:(27, 13) Failed to resolve: com.android.support.constraint:constraint-layout:1.0.1 install repository and sync project

so I tried to update my android support repository but my Internet speed is bad so I download the support repository using IDM (Internet Download Manager), but now I don't know how to install it ,I tried this way :

1.Extract the downloaded zip file.

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

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

But this error still exists Error:(27, 13) Failed to resolve: com.android.support.constraint:constraint-layout:1.0.1 install repository and sync project

Upvotes: 0

Views: 1885

Answers (1)

Guillaume Husta
Guillaume Husta

Reputation: 4385

In your project's build.gradle your should have this section :

allprojects {
    repositories {
        // support for Google's Maven repo using the google() method. Includes tools + support libs.
        google()
        jcenter()
    }
}

See also this help : https://developer.android.com/topic/libraries/support-library/setup#add-library

Upvotes: -1

Related Questions