Error:Failed to resolve: android.arch.core:common:1.1.0

Solution 1:

I resolve this issue by moving maven {url "https://maven.google.com"} before jcenter(), like this:

repositories {
    maven { url "https://maven.google.com" }
    jcenter()
    maven { url 'https://jitpack.io' }
}

This is because I find jcenter() repository has deleted the directory of android.arch.core, so we have to get this file (android.arch.core:common-1.1.0.jar) from "https://maven.google.com"

Solution 2:

Issue

In the past few weeks some Google Android libraries on jcenter have gone missing, causing errors like yours.

Example:

Could not resolve all files for configuration ':app:debugCompileClasspath'.
Could not find common.jar (android.arch.core:common:1.1.0). Searched in the following locations:
      https://jcenter.bintray.com/android/arch/core/common/1.1.0/common-1.1.0.jar

jcenter's maven-metadata.xml is still valid and contains versions which is causing gradle to assume the listed files are there and will try to download them without falling back to https://maven.google.com/. Even if you have this or google() next in your build.gradle, under jcenter().

Fix

In your root build.gradle make sure google() is before jcenter().

repositories {
    google()
    jcenter()
}

In most projects you will have to update this in 2 spots.

buildscript {
    repositories {
        google()
        jcenter()
    }

}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

Note: Use maven { url "https://maven.google.com" } instead of google() if your Gradle version is less than 4.0.

Solution 3:

Solution: move google(), before jcenter() - it worked for me.

But the issue is that you have two build.gradle files and you need to make a change in both.

Solution 4:

kindly check proxy details also because some time library not pull due to proxy error kindly check gradel.property file