简体   繁体   中英

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM