huawei-mobile-services - HMS Ads Kit - 无法解析 com.huawei.hms :ads-lite:13. 4.29.303

标签 huawei-mobile-services huawei-developers

实际上我正在尝试实现广告,但我按照代码实验室的说明做了所有事情,但显示此消息......如何解决此问题。??

错误:无法解析“:app@debugUnitTest/compileClasspath”的依赖关系:无法解析 com.huawei.hms:ads-lite:13.4.29.303。

谢谢

最佳答案

您是否已将此插件添加到您的应用程序 build.gradle 之上?

apply plugin: 'com.huawei.agconnect 

还要确保你已经在顶级 build.gradle 中添加了以下代码

    buildscript {
repositories {
    google()
    jcenter()
    maven { url 'https://developer.huawei.com/repo/' }
}
dependencies {
    classpath "com.android.tools.build:gradle:4.0.1"
    classpath 'com.huawei.agconnect:agcp:1.2.1.301'
    classpath 'com.google.gms:google-services:4.3.3'
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
   }
}

allprojects {
repositories {
    google()
    jcenter()
    maven { url 'https://developer.huawei.com/repo/' }
  }
}

关于huawei-mobile-services - HMS Ads Kit - 无法解析 com.huawei.hms :ads-lite:13. 4.29.303,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63148770/

相关文章:

android - HMS Map toolkit - 渲染 map 的问题

huawei-mobile-services - 是不是所有实现了huawei iap的应用包名都要带.huawei后缀?

android - 华为广告工具包横幅广告返回错误代码1

huawei-mobile-services - 如何修复快应用页面上的内容阻塞屏幕?

android - 是否可以在华为设备上创建重定向到华为应用程序库的 firebase 动态链接

huawei-mobile-services - 无法为华为 map 服务生成签名证书 sha 256

android - 如果设备上缺少 HMS,防止@hmscore 显示初始弹出窗口

geolocation - 如何解决华为设备上应用程序位置权限错误?

android - 如何在华为应用程序库上发布应用程序进行测试