2

我想将新的 Google Play 计费库添加到我的项目中com.android.billingclient:billing:1.0->留置权

但是当我运行时:

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

我有这个问题:

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

有任何想法吗?

4

1 回答 1

9

好的,我找到了原因。设备的 Android 版本没有问题。这是因为我们的项目中已经有一个IInAppBillingService.aidl。一旦我删除它并清理项目,一切正常。-> Github问题

于 2017-09-29T21:44:21.900 回答