Multiple maven repositories in one gradle file

前端 未结 2 1810
面向向阳花
面向向阳花 2020-12-22 17:36

So my problem is how to add multiple maven repositories to one gradle file.

This DOESN’T work:

repositories {
    mavenCentral()
            


        
2条回答
  •  庸人自扰
    2020-12-22 18:03

    you have to do like this in your project level gradle file

    allprojects {
        repositories {
            jcenter()
            maven { url "http://dl.appnext.com/" }
            maven { url "https://maven.google.com" }
        }
    }
    

提交回复
热议问题