![](/img/trans.png)
[英]Failed to resolve com.android.billingclient:billing:1.0
[英]Failed to resolve com.android.billingclient:billing:dp-1
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"
}
}
我在我的android工作室項目中有以下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 { 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
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.