Nodens Nodens - 3 years ago 198
Java Question

Google Play Billing 1.0 No interface method getBuyIntentExtraParams

I would like to add the new Google play billing library to my project

com.android.billingclient:billing:1.0
-> lien

But when I run:

final BillingFlowParams.Builder builder = BillingFlowParams.newBuilder()
.setSku(sku)
.setType(BillingClient.SkuType.INAPP);
int resultCode = mBillingClient.launchBillingFlow(activity, builder.build());


I've this issue :

Caused by: java.lang.NoSuchMethodError: No interface method getBuyIntentExtraParams(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/os/Bundle;)Landroid/os/Bundle; in class Lcom/android/vending/billing/IInAppBillingService; or its super classes (declaration of 'com.android.vending.billing.IInAppBillingService' appears in /data/app/{MY_PAKAGE_NAME}-eHTcC-Sp4zY08KZcxkl7fQ==/base.apk:classes97.dex)


BillingClientImpl.java:332

Any ideas?

Answer Source

Ok I found why. It's not a problem with the Android build of the device. It's because there already was an IInAppBillingService.aidl in our project. Once I removed it and clean the project everything is working properly. -> Github Issue

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download