在build.gradle中添加maven { url 'https://jitpack.io' }报错: but repository 'maven' was added by build file 'build.gradle'。。。
处理方法是不要添加在build.gradle里面,而是settings.gradle:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
rootProject.name = "TestApp"
include ':app'