8
Could not find com.huawei.agconnect:agcp:1.0.0.300.
Searched in the following locations:
  - https://jcenter.bintray.com/com/huawei/agconnect/agcp/1.0.0.300/agcp-1.0.0.300.pom
  - https://jcenter.bintray.com/com/huawei/agconnect/agcp/1.0.0.300/agcp-1.0.0.300.jar
  - https://dl.google.com/dl/android/maven2/com/huawei/agconnect/agcp/1.0.0.300/agcp-1.0.0.300.pom
  - https://dl.google.com/dl/android/maven2/com/huawei/agconnect/agcp/1.0.0.300/agcp-1.0.0.300.jar
Required by:
    project :

I am following this document but still facing issue. https://developer.huawei.com/consumer/en/codelab/HMSAnalyticsKit/index.html#2

Can anyone help?

deadfish
  • 11,996
  • 12
  • 87
  • 136
Lokesh Tiwari
  • 10,496
  • 3
  • 36
  • 45

3 Answers3

9

Looks like you are missed to add application gradle configurations.

Try after adding these lines on your gradle file

buildscript {
    repositories {      
        maven { url 'http://developer.huawei.com/repo/' }
    }
    dependencies {
        classpath 'com.huawei.agconnect:agcp:1.2.0.300'
    }
}

allprojects {
    repositories {  
        maven { url 'http://developer.huawei.com/repo/' }
    }
}
Asharali V U
  • 973
  • 9
  • 25
1

Though your environment is built based on the codelab of Analytics Kit, but the AppGallery Connect plug-in is not configured correctly, so you cannot find it. Configure it by referring to the guide at the link.

zhangxaochen
  • 32,744
  • 15
  • 77
  • 108
0

Make sure to use the current version; it's more alike this:

buildscript {
    repositories {
        google()
        mavenCentral()
        maven { url "https://developer.huawei.com/repo/" }
    }
    dependencies {
        classpath "com.android.tools.build:gradle:7.0.2"
        classpath "com.huawei.agconnect:agcp:1.6.0.300"
    }
}
Martin Zeitler
  • 1
  • 19
  • 155
  • 216