gpt4 book ai didi

android-gradle-plugin - 由于 "Unable to load Maven meta-data from ..."Gradle 同步失败,但我可以通过浏览器下载文件

转载 作者:行者123 更新时间:2023-12-04 13:59:20 27 4
gpt4 key购买 nike

buildscript {

repositories {

google()

jcenter()
jcenter{ url"http://jcenter.bintray.com"}
maven {
url 'http://dl.bintray.com/amulyakhare/maven'
}

}
dependencies {
classpath "com.android.tools.build:gradle:$android_plugin_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
classpath "com.mob.sdk:MobSDK:+"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}


allprojects {
repositories {

google()

jcenter()
jcenter{ url"http://jcenter.bintray.com"}

maven {
url 'http://dl.bintray.com/amulyakhare/maven'
}

}

}

这是我的 gradle 文件。什么时候做gradle同步,就报错了。
Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve com.mob.sdk:MobSDK:+.
Caused by: org.gradle.api.resources.ResourceException: Unable to load Maven meta-data from http://jcenter.bintray.com/com/mob/sdk/MobSDK/maven-metadata.xml.

Caused by: org.gradle.api.resources.ResourceException: Could not get resource 'http://jcenter.bintray.com/com/mob/sdk/MobSDK/maven-metadata.xml'.
Caused by: org.gradle.internal.resource.transport.http.HttpRequestException: Could not GET 'http://jcenter.bintray.com/com/mob/sdk/MobSDK/maven-metadata.xml'.

但是我可以下载网址 http://jcenter.bintray.com/com/mob/sdk/MobSDK/maven-metadata.xml直接通过浏览器。
有谁知道为什么会这样?

最佳答案

buildscript {
repositories {
maven {url 'http://maven.aliyun.com/nexus/content/groups/public/'}
}
}
...............
...............
allprojects{
repositories {
maven {url 'http://maven.aliyun.com/nexus/content/groups/public/'}
}
}

关于android-gradle-plugin - 由于 "Unable to load Maven meta-data from ..."Gradle 同步失败,但我可以通过浏览器下载文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54457960/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com