为什么Google Play结算库未显示在SDK Manager中?

use*_*193 5 sdk android in-app-purchase in-app-billing play-billing-library

我想在应用内购买Android应用程序,我经常阅读我必须从SDK Manager下载Google Play结算库

(例如http://www.techotopia.com/index.php/An_Android_Studio_Google_Play_In-app_Billing_Tutorial#Installing_the_Google_Play_Billing_Library),但我找不到它.我需要这个文件吗?如果是,我如何管理它显示给我?在developers.android webside上没有写入Google Play结算库,但如果我将他们的示例代码复制到我的项目中,我会收到很多错误.我在github上搜索了示例项目,我找到了一个,但是当我运行它时,应用程序崩溃了.有没有示例项目,我认为这可以解决我的问题?

我的SDK Manager

谢谢 !!!

Gab*_*tti 16

检查官方博客:

Play Billing Library可通过Maven存储库获得

只需添加:

dependencies {
    ...
    compile 'com.android.billingclient:billing:1.0'
}
Run Code Online (Sandbox Code Playgroud)

您可以在官方文档中找到有关该库的更多详细信息.