Lokesh Tiwari
Lokesh Tiwari

Reputation: 10586

Could not find com.huawei.agconnect:agcp:1.0.0.300

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?

Upvotes: 10

Views: 7955

Answers (3)

Martin Zeitler
Martin Zeitler

Reputation: 76849

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"
    }
}

Upvotes: 0

zhangxaochen
zhangxaochen

Reputation: 34047

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.

Upvotes: 1

Asharali V U
Asharali V U

Reputation: 1099

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/' }
    }
}

Upvotes: 10

Related Questions