更新了Android Studio Arctic Fox版本后,添加某些库一直报找不到某些库的错误
Failed to resolve:xxx.xxx.xxx
按照之前的方法就是因为没有在根目录的gradle文件allprojects里添加某些远程仓库。
但最新版AS创建项目,默认allprojects居然是改在了setting.gradle 下配置
例如:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
maven { url 'https://maven.aliyun.com/repository/public/' }
maven { url 'https://maven.aliyun.com/repository/google/' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
google()
jcenter()
mavenCentral()
maven { url "https://maven.aliyun.com/nexus/content/repositories/releases" }
maven { url 'https://jitpack.io' }
}
}
rootProject.name = "xxx"
include ':app'
望周知