|
/

集成华为厂商通道编译时提示502

FFt
发布于 5 年前
444
消息推送 U-Push
SDK集成与升级

Execution failed for task ':app:checkDebugAarMetadata'.

> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.

> Could not resolve com.huawei.hms:push:6.1.0.300.

Required by:

project :app

> Could not resolve com.huawei.hms:push:6.1.0.300.

> Could not get resource 'https://dl.bintray.com/rongcloud/maven/com/huawei/hms/push/6.1.0.300/push-6.1.0.300.pom'.

> Could not HEAD 'https://dl.bintray.com/rongcloud/maven/com/huawei/hms/push/6.1.0.300/push-6.1.0.300.pom'. Received status code 502 from server: Bad Gateway

4个回答
 
5 年前

在项目的build.gradle中加入

 maven {url 'http://developer.huawei.com/repo'}
 
5 年前

官方文档相关内容如下:

添加依赖

根目录build.gradle中添加Maven仓库地址:

buildscript {
repositories {
...
maven { url 'https://developer.huawei.com/repo/'}
}
dependencies {
...
classpath 'com.huawei.agconnect:agcp:1.6.0.300'
}
}
allprojects {
repositories {
...
maven { url 'https://developer.huawei.com/repo/'}
maven { url 'https://repo1.maven.org/maven2/' }
}
}

在app/build.gradle文件中添加依赖:


dependencies {
api 'com.umeng.umsdk:huawei-umengaccs:1.3.6'
api 'com.huawei.hms:push:6.1.0.300'
}

 
5 年前

https://dl.bintray.com/这个地址不稳定,估计已经挂掉了,需要换仓库

 
5 年前
Loading ...
登录社区,分享你的经验