Adnroid 《如何设置 gradle》

在新版的Android中设置 https://jitpack.io
由原来的
原来在build.gradle中配置的

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

改到了settings.gradle中

dependencyResolutionManagement {
	repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
		mavenCentral()
		maven { url 'https://jitpack.io' }
  }
}

在gradle 添加依赖

dependencies {
	implementation 'com.github.User:Repo:Tag'
}
posted @ 2024-02-27 13:36  一个小笨蛋  阅读(4)  评论(0编辑  收藏  举报