Gradle fails to resolve dependencies in Android Studio

后端 未结 8 818
野的像风
野的像风 2021-01-07 17:56

Whenever I add a dependency from an remote repository (jcenter) in Android Studio 1.1 (OS X) I get the following error upon syncing Gradle:

Error:(26, 13) Fa         


        
相关标签:
8条回答
  • 2021-01-07 18:51

    Rather late but probably your gradle works in offline mode. Go to File->Settings->Gradle and uncheck the offline mode. Then try to refresh gradle and it should work

    0 讨论(0)
  • 2021-01-07 18:52

    I have similar problem -> ERROR: Failed to resolve:

    solved by using maven { url 'https://jitpack.io' } instead of maven {url 'https://maven.google.com/'}

    I have added it in project level build.gradle

    allprojects {
      repositories {
        maven { url 'https://jitpack.io' }
      }
    }
    

    It works fine.

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