Android Studio maven { url “https://jitpack.io” } can't download

后端 未结 2 559
长发绾君心
长发绾君心 2020-12-17 16:50

Can\'t use anymore maven { url \"https://jitpack.io\" }. I have following gradle:

apply plugin: \'com.android.application\'


android {
    comp         


        
2条回答
  •  遥遥无期
    2020-12-17 16:59

    Its because jitpack is the only repository you've added. You need to also add Google's repo like this:

    allprojects {
        repositories {
            google()
            maven { url "https://jitpack.io" }
        }
    }
    

    Also on a side note, just a few tips:

    • Specify what version of a library you are using. (So don't write :27.+)
    • Put your allprojects function in your project level gradle. (project/build.gradle)

提交回复
热议问题