需要帮助如何解决HMS的问题。
> Could not get resource
> 'https://dl.bintray.com/android/android-tools/com/huawei/agconnect/agcp/1.6.0.300/agcp-1.6.0.300.pom'.
> > Could not GET 'https://dl.bintray.com/android/android-tools/com/huawei/agconnect/agcp/1.6.0.300/agcp-1.6.0.300.pom'.
> Received status code 502 from server: Bad Gatewaybuild.gradle:
repositories {
google()
jcenter()
maven { url 'https://dl.bintray.com/android/android-tools' }
maven {url 'https://developer.huawei.com/repo/'}
}发布于 2021-12-01 07:02:10
从服务器接收状态代码502 :坏网关
这可能是因为gradle处于脱机模式,或者当前网络是有限的。因此,建议您检查分级配置和网络设置。
buildscript {
repositories {
google()
jcenter()
// Configure the Maven repository address for the HMS Core SDK.
maven {url 'https://developer.huawei.com/repo/'}
}
dependencies {
...
// Add the AppGallery Connect plugin configuration. You are advised to use the latest plugin version.
classpath 'com.huawei.agconnect:agcp:1.6.0.300'
}
}
allprojects {
repositories {
google()
jcenter()
// Configure the Maven repository address for the HMS Core SDK.
maven {url 'https://developer.huawei.com/repo/'}
}
} 有关如何配置build.gradle文件的详细信息,请参阅这。
发布于 2021-12-01 06:50:15
从这里取走
找不到com.huawei.agconnect:agcp:1.0.0.300
“看来您错过了添加应用程序级配置的机会。
在您的gradle文件中添加这些行之后,尝试
buildscript {
repositories {
maven { url 'http://developer.huawei.com/repo/' }
}
dependencies {
classpath 'com.huawei.agconnect:agcp:1.2.0.300'
}
}
allprojects {
repositories {
maven { url 'http://developer.huawei.com/repo/' }
}
}“
或者其他选择之一..。
https://stackoverflow.com/questions/70179964
复制相似问题