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

标签 android android-studio referrer

<分区>

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

Play Install Referrer Library 1.0 现已可用

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

但是它给了我错误:

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

最佳答案

确保您在项目根目录中添加了 google(),即:

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

他们的文档中没有提到

关于android - 无法解析 : com. android.installreferrer:installreferrer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47430102/

相关文章:

java - 带有 Android 客户端 : connection timed out 的 Linux 服务器

Android:将文本样式设置为 TextView 文本的一部分

android - 无法解决依赖错误

referrer - 是否可以伪造网络浏览器发送的引用信息?

android - Gradle 混合版本警告

android - 带有 “android system/linux errors”的android studio logcat

android-studio - 更改单词边界 intellij

java - 将 matplotlib (Python) 与 Android Studio 集成

HTTP 引荐来源网址陷阱?

android - 使用 Amazon Appstore 跟踪 Android 安装引荐来源网址