华为推送 & Failed to resolve: com.huawei.android.hms:push:2.5.3.302

说明

由于在第一个项目中已经集成了华为推送,现在是直接将整个Library导入到新项目。

报错如下:

Failed to resolve: com.huawei.android.hms:push:2.5.3.302
Show in File
Show in Project Structure dialog

百思不得解,尝试clean,降低版本都不行,后来直接去翻集成文档了。

《华为推送 & Failed to resolve: com.huawei.android.hms:push:2.5.3.302》 恍然大悟,忘记在父项目的 build.gradle 中配置了,尴尬…

解决

导入之后,忘记在 父项目中 配置上述信息了,加上就解决了。

allprojects {
    addRepos(repositories)
    repositories{
        maven {url 'http://developer.huawei.com/repo'}
    }
}

第三方库遇到奇葩问题,最好再去翻一下集成文档!

    原文作者:南窗云
    原文地址: https://www.jianshu.com/p/b9020a7a44b2
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞