需要幫助如何解決 HMS SDK 的問題。
> 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 Gateway
構建.gradle:
repositories {
google()
jcenter()
maven { url 'https://dl.bintray.com/android/android-tools' }
maven {url 'https://developer.huawei.com/repo/'}
}
uj5u.com熱心網友回復:
從服務器收到狀態代碼 502:Bad Gateway
這可能是因為 gradle 處于離線模式或當前網路受限。因此,建議您檢查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 檔案的詳細資訊,請參閱此。
uj5u.com熱心網友回復:
取自這里
找不到 com.huawei.agconnect:agcp:1.0.0.300
“看起來您錯過了添加應用程式 gradle 配置。
在您的 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://www.uj5u.com/qiye/374988.html
