目前找到的所有教程都过时了,如果其他教程不能满足,可以试试下面的:
首先找到setting.gradle.kts文件
修改如下:
pluginManagement {
repositories {
maven ("https://maven.aliyun.com/repository/public/" )
maven ("https://maven.aliyun.com/repository/google/")
maven ("https://maven.aliyun.com/repository/jcenter/")
maven ("https://maven.aliyun.com/repository/central/")
google()
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
maven ("https://maven.aliyun.com/repository/public/")
maven ("https://maven.aliyun.com/repository/google/")
maven ("https://maven.aliyun.com/repository/jcenter/")
maven ("https://maven.aliyun.com/repository/central/")
google()
mavenCentral()
}
}
rootProject.name = "Music02"
include(":app")