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

后端 未结 2 554
长发绾君心
长发绾君心 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)
    0 讨论(0)
  • 2020-12-17 17:11

    Omg, finally got it!

    So I had to use it like it's mentioned on jitpack official site:

    maven { url 'https://www.jitpack.io' }
    

    but I just copy/paste it from jitpack github:

    maven { url 'https://jitpack.io' }
    
    0 讨论(0)
提交回复
热议问题