Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to resolve: com.android.installreferrer:installreferrer [duplicate]

Regards to https://android-developers.googleblog.com/2017/11/google-play-referrer-api-track-and.html

Play Install Referrer Library 1.0 now available

To make it easy to integrate the Install Referrer API, we've released the Install Referrer Library 1.0 for Android. The library is available in our Maven repository. To start using it, add the following dependency to your app module build.gradle file:

dependencies {
      ...
      compile 'com.android.installreferrer:installreferrer:1.0'
  }

However it gives me error:

Failed to resolve: com.android.installreferrer:installreferrer:1.0

like image 331
Maxim Shoustin Avatar asked Nov 22 '17 08:11

Maxim Shoustin


1 Answers

Be sure you have added google() in your project root, a.e.:

allprojects {
    repositories {
        google()

        // If you're using a version of Gradle lower than 4.1, you must
        // instead use:
        // maven {
        //     url 'https://maven.google.com'
        // }
    } }

It's not mentioned in their DOCs

like image 116
Maxim Shoustin Avatar answered Nov 13 '22 01:11

Maxim Shoustin