无法解析com.android.billingclient:billing:dp-1

前端之家收集整理的这篇文章主要介绍了无法解析com.android.billingclient:billing:dp-1前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
  1. project(":android") {
  2. apply plugin: "android"
  3. apply plugin: "com.android.application"
  4.  
  5. configurations { natives }
  6.  
  7. dependencies {
  8. compile project(":core")
  9. compile "com.android.billingclient:billing:dp-1"
  10. compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
  11. natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
  12. natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
  13. natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a"
  14. natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
  15. natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64"
  16. compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
  17. natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi"
  18. natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi-v7a"
  19. natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-arm64-v8a"
  20. natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86"
  21. compile "com.google.android.gms:play-services-ads:11.0.0"
  22. compile "com.android.billingclient:billing:dp-1"
  23.  
  24.  
  25. }

}

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

解决方法

com.android.billingclient:billing:dp-1在mavenCentral中不存在,但在jcenter中.您需要做的就是将jcenter()添加到存储库部分.
  1. allprojects {
  2. apply plugin: "eclipse"
  3. apply plugin: "idea"
  4.  
  5. version = '1.0'
  6. ext {
  7. appName = "FidgetSpinner"
  8. gdxVersion = '1.9.6'
  9. roboVMVersion = '2.3.0'
  10. Box2DLightsVersion = '1.4'
  11. ashleyVersion = '1.7.0'
  12. aiVersion = '1.8.0'
  13. }
  14.  
  15. repositories {
  16. mavenLocal()
  17. mavenCentral()
  18. maven { url "http://oss.sonatype.org/content/repositories/snapshots/" }
  19. maven { url "http://oss.sonatype.org/content/repositories/releases/" }
  20. jcenter() <<<<<<------------ ADD THIS LINE TO MAKE IT WORK
  21. }

猜你在找的Android相关文章