android - 在 android 中从 jcenter() 迁移到 mavelCentral() 问题
问题描述
如您所知,Jfrog 将要关闭jcenter()
,我们必须从jcenter()
提到mavencentral()
的android 文档迁移到。
我做到了,但在构建项目后,我收到以下错误:
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 错误
- 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
这是我的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
}
有什么解决办法吗?
解决方案
推荐阅读
- java - 未自动装配/注入时是否实例化弹簧组件?
- javascript - 在 reducer 状态下向嵌套数据结构中添加新项
- javascript - 如何在 Reason 中设置 DOM 元素的文本?
- r - 读入 R 的文件:是否仍在“访问”或 ping?闪亮的同样问题
- python - 如何在范围内的列表中使用 .count 函数
- php - 在 Laravel 中排队新的行插入请求以确保服务器端验证并避免重复
- ssis - 使用原始文件丢失数据流中的数据
- php - 在自定义规则文件中使用默认的 laravel 验证规则
- php - 我的 PHP HTML 电子邮件表单的某些 CSS 无法进入邮件表单
- mysql - 在 mySQL 中按固定详细级别比较日期