首页 > 解决方案 > 无法在本地解决 tapandpay 依赖项

问题描述

无法解决:com.google.android.gms:play-services-tapandpay:17.1.2 来自developers.google 的说明:

dependencies {
  // ...
  implementation 'com.google.android.gms:play-services-tapandpay:17.1.0'
  // Getting a "Could not find" error? Make sure you have added the unzipped SDK
  // location to your root build.gradle file as a local maven dependency
}
allprojects {
    // ...
    repositories {
        // ...
        google() // Google's public Maven repository
        maven { url "file:/path/to/your/repo/m2repository/" }  // Local path to the folder into which you unzipped the SDK
    }
}

ERROR:
Execution failed for task
> Could not resolve all files for configuration 
   > Could not find com.google.android.gms:play-services-tapandpay:17.1.2.
     Required by:
         project :app

我找不到正确的方法

标签: androidgradlebuild.gradleandroid-tap-and-pay

解决方案


我解决了我的错误。我添加到 build.gradle

allprojects {
    repositories {
        google()
        jcenter()
        mavenLocal()
       maven { url "file:/*pathto*/sdk/extras/google/m2repository/" }
    }
}

推荐阅读