Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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://www.techotopia.com/index.php/An_Android_Studio_Google_Play_In-app_Billing_Tutorial#Installing_the_Google_Play_Billing_Library ), but I can't find it there. Does I need this file? If yes, how can I manage that it is shown to me? On the developers.android webside is nothing written of the Google Play Billing Library, but if I copy their sample code to my project, I get many errors. I searched for Example projects for example on github, I found one, but when I run it, the app crashes. Is there any sample project, I think this would solve my problems?

My SDK Manager

THANKS !!!

like image 608
user7940193 Avatar asked Sep 24 '17 15:09

user7940193


2 Answers

Checking the offical blog:

Play Billing Library is available through Maven repository

Just add:

dependencies {
    ...
    compile 'com.android.billingclient:billing:1.0'
}

You can find more details about the library in the official doc.

like image 58
Gabriele Mariotti Avatar answered Nov 14 '22 22:11

Gabriele Mariotti


You are referring to the old Google Play Billing library (v3), which if you really want to implement you can find it as part of the TrivialDrive demo app below. You can copy parts that you need (aidl, util) and change your app as per demo sample.
https://github.com/googlesamples/android-play-billing/tree/master/TrivialDrive

~~~

The new version of Play Billing library v1.0 is covered by Garbriele Mariotti's answer (above). If you happen to use a platform that doesn't support Maven, Gradle or AARs I will be making it available soon (UPDAT to follow) as an Eclipse based project that you may be able to import into your IDE the same way you wanted to import the old library downloaded through SDK Manager (which probably doesn't include it anymore as they dev team doens't want you to use it anymore).

If you just want to download it and look at it, you can download it from here:
https://google.bintray.com/play-billing/com/android/billingclient/billing/1.0/

~~~

Google Play Billing 1.0 library for Eclipse available from here:
https://github.com/dandar3/android-google-services-billing/tree/1.0

like image 40
Dan Dar3 Avatar answered Nov 14 '22 21:11

Dan Dar3