Why is the Google Play Billing Library not shown up in the SDK Manager?

前端 未结 3 1362
小蘑菇
小蘑菇 2020-12-03 23:05

I\'d like to make an android application with in app purchases, I read often that I have to download the Google Play Billing Library from SDK Manager

(e.g. http://ww

3条回答
  •  抹茶落季
    2020-12-03 23:58

    Play Billing Library is available through Maven repository.

    Add in top level build.gradle file

        buildscript {
    
        mavenCentral()     
        }
    
        ................
        allprojects {
    
        repositories {
    
        mavenCentral()
           }
        }
    

    Add dependency into module level build.gradle file.

       implementation 'com.android.billingclient:billing:1.0'
    

    Then After implement in app billing sample example into your project.

    https://codelabs.developers.google.com/codelabs/play-billing-codelab/#0

    This link you can find sample code of in app billing example of google

    https://github.com/googlesamples/android-play-billing

提交回复
热议问题