I can't find Google Play Billing Library in the Android Studio SDK Manager [duplicate]

元气小坏坏 提交于 2019-12-13 16:07:00

问题


I'd like to make an android application with in app purchases. So I read some document and knew that I have to download the Google Play Billing Library from SDK Manager. But I can't find that library in my Android Studio SDK Manager. I tried to add compile 'com.android.billingclient:billing:1.0' to the dependencies section of the build.gradle file for my app. But I can't still find the library..

How can I solve my problem?


回答1:


It looks like you have to add it to your build.gradle dependencies, have a look at these docs. So it won't appear in the SDK manager. Once you've added the dependency in build.gradle, you'll need to create a billing library client, as per the code in the example in the docs.

Or, have a look at the billing example provided by Google.




回答2:


here:https://github.com/bumptech/glide/issues/2993

Solved by re-order repositories from

repositories {
  google()
  jcenter()
  mavenCentral()
}

To

repositories {
  mavenCentral()
  google()
  jcenter()
}


来源:https://stackoverflow.com/questions/48831282/i-cant-find-google-play-billing-library-in-the-android-studio-sdk-manager

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!