无法解析com.android.billingclient:billing:dp-1 [英] Failed to resolve com.android.billingclient:billing:dp-1

查看:453
本文介绍了无法解析com.android.billingclient:billing:dp-1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  project(:android){
apply plugin:android
apply plugin:com.android.application

配置{土着}

依赖项{
编译项目(:core)
编译com.android.billingclient:billing:dp-1
编译com.badlogicgames.gdx:gdx-backend-android:$ gdxVersion
nativescom.badlogicgames.gdx:gdx-platform:$ gdxVersion:natives-armeabi
nativescom.badlogicgames。 gdx:gdx-platform:$ gdxVersion:natives-armeabi-v7a
nativescom.badlogicgames.gdx:gdx-platform:$ gdxVersion:natives-arm64-v8a
nativescom.badlogicgames。 gdx:gdx-platform:$ gdxVersion:natives-x86
nativescom.badlogicgames.gdx:gdx-platform:$ gdxVersion:natives-x86_64
compilecom.badlogicgames.gdx:gdx- freetype:$ gdxVersion
nativescom.badlogicgames.gdx:gdx-freetype-platform:$ gdxVersion:natives-armeabi
nativescom.badlogicgames.gdx:gdx-freetype-platform:$ gdxVersion :当地人-armeabi-V7A
nativescom.badlogicgames.gdx:gdx-freetype-platform:$ gdxVersion:natives-arm64-v8a
nativescom.badlogicgames.gdx:gdx-freetype-platform:$ gdxVersion:natives- x86
compilecom.google.android.gms:play-services-ads:11.0.0
compilecom.android.billingclient:billing:dp-1



code

$ b $ p

我在我的android studio项目中有一个下面的gradle代码,它仍然给我一个错误无法解析com.android.billingclient:billing:dp-1,为什么它不会同步?我应该附加更多的东西吗?

解决方案

com.android.billingclient:billing:dp-1不存在于mavenCentral但jcenter 。您只需将jcenter()添加到存储库部分即可。

  allprojects {
apply plugin: eclipse
apply plugin:idea

version ='1.0'
ext {
appName =FidgetSpinner
gdxVersion ='1.9.6 '
roboVMVersion ='2.3.0'
box2DLightsVersion ='1.4'
ashleyVersion ='1.7.0'
aiVersion ='1.8.0'
}

repositories {
mavenLocal()
mavenCentral()
maven {urlhttp://oss.sonatype.org/content/repositories/snapshots/}
maven {urlhttp://oss.sonatype.org/content/repositories/releases/}
jcenter()<<<<<<<<<<- -----添加此行以使其工作


project(":android") {
apply plugin: "android"
apply plugin: "com.android.application"

configurations { natives }

dependencies {
    compile project(":core")
    compile "com.android.billingclient:billing:dp-1"
    compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
    natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
    natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
    natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a"
    natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
    natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64"
    compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
    natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi"
    natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi-v7a"
    natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-arm64-v8a"
    natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86"
    compile "com.google.android.gms:play-services-ads:11.0.0"
    compile "com.android.billingclient:billing:dp-1"


}

}

i have a following gradle code in my android studio project and it still gives me an error "Failed to resolve com.android.billingclient:billing:dp-1", why it won't sync? Should i attach something more?

解决方案

com.android.billingclient:billing:dp-1 is not present in mavenCentral but in jcenter. All you need to do is to add jcenter() to the repositories section.

    allprojects {
apply plugin: "eclipse"
apply plugin: "idea"

version = '1.0'
ext {
    appName = "FidgetSpinner"
    gdxVersion = '1.9.6'
    roboVMVersion = '2.3.0'
    box2DLightsVersion = '1.4'
    ashleyVersion = '1.7.0'
    aiVersion = '1.8.0'
}

repositories {
    mavenLocal()
    mavenCentral()
    maven { url "http://oss.sonatype.org/content/repositories/snapshots/" }
    maven { url "http://oss.sonatype.org/content/repositories/releases/" }
    jcenter()        <<<<<<------------ ADD THIS LINE TO MAKE IT WORK
}

这篇关于无法解析com.android.billingclient:billing:dp-1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆