android 中从 jcenter() 迁移到 mavelCentral() 问题

问题描述

如您所知,Jfrog 将关闭 jcenter(),我们必须从 jcenter() 迁移到 mavencentral(),如 android docs 所述。

我做到了,但在构建项目后出现以下错误:

Could not find com.android.tools.build:gradle:4.1.3
Searched in the following locations:
- https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/4.1.3/gradle-4.1.3.pom
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.1.3/gradle-4.1.3.pom

当您点击链接时,您会收到 404 错误

这是我的 project level build.gradle 文件:

buildscript {
ext.kotlin_version = "1.3.72"
repositories {
    mavenCentral()
    google()
}
dependencies {
    classpath "com.android.tools.build:gradle:4.1.3"
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}

 allprojects {
    repositories {
       mavenCentral()
       google()
   }
 }
 task clean(type: Delete) {
    delete rootProject.buildDir
 }

有什么解决办法吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...