实际上我正在尝试实现广告,但我按照代码实验室的说明做了所有事情,但显示此消息......如何解决此问题。??
错误:无法解析“: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/