android - 无法解析 com.huawei.agconnect :agcp:1. 6.0.300

标签 android maven gradle huawei-mobile-services

需要帮助解决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

build.gradle:

repositories {
        google()
        jcenter()  
        maven { url 'https://dl.bintray.com/android/android-tools' }    
        maven {url 'https://developer.huawei.com/repo/'}    
    }

最佳答案

Received status code 502 from server: 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文件,请引用this .

关于android - 无法解析 com.huawei.agconnect :agcp:1. 6.0.300,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70179964/

相关文章:

android - 桌面版 Chrome 中的正 SSL 受信任,但不适用于 Android

java - 关于缺少 javax/mail/mail/1.4/activation.jar 的 Maven 编译错误。怎么修?

android - Gradle 模块类型

android - 使用 sdk spotify-android-auth 从 Spotify 注销

android - 有没有人知道如何在 android 中使用 L2TP/IPSec 服务器协议(protocol)以编程方式建立 VPN 连接?

java - 客户端服务器android上的数据库

java - 我无法从命令行启动 jetty,它需要 Main-Class list 属性

Maven 构建因测试失败而失败,但所有 surefire 报告都正常

spring-boot - 如何使用gradle为as400 db2制作spring boot Web服务?

android - com.android.builder.dexing.DexArchiveBuilderException : Error while dexing