Android - 应用帐单中使用的错误
问题描述:
我试过以下this link以将应用帐单添加到我的应用中。Android - 应用帐单中使用的错误
我将此添加到我的build.gradle
dependencies {
...
compile 'com.android.billingclient:billing:dp-1'
}
但是当我建设 - 我得到这个错误>清洁工程
Error:A problem occurred configuring project ':android'.
> Could not resolve all dependencies for configuration
':android:_debugApkCopy'.
> Could not find com.android.billingclient:billing:dp-1.
Required by:
Mygame:android:1.0
我失去了什么?我在Google上搜索时找不到任何有用的信息。我正在使用libgdx和Android Studios。
答
com.android.billingclient:billing:dp-1
在jcenter存储库中可用,因此将jcenter
添加到您的根build.gradle
文件的存储库列表中。
allprojects {
apply plugin: "eclipse"
apply plugin: "idea"
version = '1.0'
ext {
appName = "MyTest"
gdxVersion = '1.9.6'
roboVMVersion = '2.3.0'
box2DLightsVersion = '1.4'
ashleyVersion = '1.7.0'
aiVersion = '1.8.0'
}
repositories {
mavenLocal()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
maven { url "https://maven.google.com/"}
jcenter() // <-- Add this
}
}