无法解析 com.android.billingclient:billing:1.0

Failed to resolve com.android.billingclient:billing:1.0

我有类似 的问题,但在我的情况下 gradle 无法解析计费库 v1.0,即使我将 jcenter() 存储库添加到构建脚本中也是如此:

buildscript {
    repositories {
        mavenLocal()
        mavenCentral()
        google()
        jcenter()
        maven {url "https://maven.fabric.io/public"}
    }
    dependencies {
       classpath "com.android.tools.build:gradle:3.1.0"
       classpath "com.google.gms:google-services:3.1.0"
       classpath "io.fabric.tools:gradle:1.24.4"
    }
}

我找到了存储库列表的解决方案 here. You need to add http://jcenter.bintray.com

repositories {
    maven { url "https://jcenter.bintray.com" }
}