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

前端 未结 5 1420
名媛妹妹
名媛妹妹 2020-11-29 04:27

My system suddenly went off and I switched it on and I got Error:Failed to resolve: android.arch.core:common:1.1.0 error in my android studio. I have tried clean and rebuild

相关标签:
5条回答
  • 2020-11-29 04:53

    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"

    0 讨论(0)
  • 2020-11-29 04:56

    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.

    0 讨论(0)
  • 2020-11-29 04:58

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

    0 讨论(0)
  • 2020-11-29 05:06

    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.

    0 讨论(0)
  • 2020-11-29 05:08

    I think it because of androidx libraries. u should delete this two lines in Gradle.properties

    android.useAndroidX=true android.enableJetifier=true

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