Lirka Kayda
Lirka Kayda

Reputation: 51

HMS Ads Kit - Could not resolve com.huawei.hms:ads-lite:13.4.29.303

Actually i was trying to implement ads but i did everything with instruction of codelab but this message is showing .... how can resolve this problem.??

ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve com.huawei.hms:ads-lite:13.4.29.303.

Thanks

Upvotes: 3

Views: 1280

Answers (2)

RiteshChanchal
RiteshChanchal

Reputation: 81

Have you added this plugin in top of your app build.gradle?

apply plugin: 'com.huawei.agconnect 

Also make sure you have added below code in top-level 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/' }
  }
}

Upvotes: 2

Mahmut Can Sevin
Mahmut Can Sevin

Reputation: 96

Please verify your top level build.gradle looks like this:

enter image description here

After that, verify you are not using proxy settings:

Go to Settings -> Appearance & Behavior -> System Settings ->HTTP Proxy

Finally go to File-> Invalidate Caches / Restart

enter image description here

Upvotes: 1

Related Questions