|
/

华为sdk运行编译报错Could not resolve com.huawei.hms:push:6

1133***@163.com
发布于 5 年前
5113
消息推送 U-Push
SDK集成与升级
功能使用

如题, 请哪位大佬解答解答

3: Task failed with an exception.

-----------

* What went wrong:

Execution failed for task ':app:processDebugMainManifest'.

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

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

Required by:

project :app > project :module_lib

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

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

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

* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

==============================================================================

5个回答
 
5 年前
maven{url"https://dl.bintray.com/thelasterstar/maven/"}

这行删了试试,我刚刚确认了一下,是https://dl.bintray.com/thelasterstar/maven/访问不了了。

 
5 年前

就是照着文档以及3分钟示列的demo集成的

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
google()
mavenCentral()
maven { url "http://mvn.mob.com/android"}
maven { url 'https://repo1.maven.org/maven2/' }
maven { url 'https://developer.huawei.com/repo/' }

}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.1'

classpath 'com.mob.sdk:MobSDK:2018.0319.1724'
classpath 'com.huawei.agconnect:agcp:1.6.0.300'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven {
url 'http://maven.aliyun.com/nexus/content/groups/public/'
}
google()
mavenCentral()
maven { url 'https://jitpack.io' }
maven { url "https://dl.bintray.com/thelasterstar/maven/" }
maven { url "http://mvn.mob.com/android"}
maven { url 'https://repo1.maven.org/maven2/' }
maven { url 'https://developer.huawei.com/repo/' }

}
}

 
5 年前

楼楼~按这里检查一下哦~

https://developer.umeng.com/docs/67966/detail/98589#h1--push-3

记得用在线gradle依赖,然后记得

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/' }
}
}

https://developer.huawei.com/repo/ 、com.huawei.agconnect:agcp:1.6.0.300这两个是必须的哈

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