【问题标题】:Failed to resolve: com.android.installreferrer:installreferrer [duplicate]无法解决:com.android.installreferrer:installreferrer [重复]
【发布时间】:2017-11-22 08:37:47
【问题描述】:

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

Play Install Referrer Library 1.0 现已推出

为了便于集成 Install Referrer API,我们发布了适用于 Android 的 Install Referrer Library 1.0。该库在我们的 Maven 存储库中可用。要开始使用它,请将以下依赖项添加到您的应用模块 build.gradle 文件中:

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

但是它给了我错误:

无法解析:com.android.installreferrer:installreferrer:1.0

【问题讨论】:

  • @IntelliJAmiya 是的,我知道,我可以复制它,但它会在谷歌搜索中快速回复这个问题:)

标签: android android-studio referrer


【解决方案1】:

确保您在项目根目录中添加了google(),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'
        // }
    } }

他们的文档中没有提到它

【讨论】:

猜你喜欢
  • 2013-02-15
  • 2011-08-18
  • 1970-01-01
  • 1970-01-01
  • 2018-11-06
  • 2019-11-18
  • 2018-11-26
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多