Gradle编译

杂项 · 2022-05-30 · 1908 人浏览

Build was configured to prefer settings repositories over project repositori…问题解决
在gradle7.0版本以后,Android安装包需将maven { url ‘https://jitpack.io’ }
部分安装至settings.gradle里,其代码如下

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

将dependencies 安装至build.gradle(:app)下

dependencies {
implementation’xxxx’
}

即可

Theme Jasmine by Kent Liao