Home > Net >  Could not resolve in adding HMS Huawei repos in gradle
Could not resolve in adding HMS Huawei repos in gradle

Time:01-05

im trying to integrate in HMS Huawei, in adding classpath im have error:

Could not resolve com.huawei.agconnect:agcp:1.6.0.300.

my build.gradle:

buildscript {

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

    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.3'
        classpath 'com.google.gms:google-services:4.3.8'
        classpath 'com.huawei.agconnect:agcp:1.6.0.300'
    }
}



allprojects {
    repositories {

        google()
        jcenter()
        repositories {
            maven { url  'http://dl.bintray.com/swallowsonny/ext/' }
            maven { url 'https://jitpack.io' }
            maven { url 'https://developer.huawei.com/repo/' }
        }

    }
}


my gradle ver: 6.7.1 and gradle plugin ver: 4.1.3

CodePudding user response:

Try this:

Go to File -> Project Settings -> Gradle and uncheck the Gradle offline work option.

Synchronize the project again and let all the dependencies get downloaded.

  •  Tags:  
  • Related