android billing inApp/subscription Unable to find

2019-07-24 17:07发布

I want to implement subscription billing feature, but when i call launchBillingFlow method, i am getting error like this

android.content.ActivityNotFoundException: Unable to find explicit activity class {com.calendargb/com.android.billingclient.api.ProxyBillingActivity}; have you declared this activity in your AndroidManifest.xml

Here it is my sample

  BillingFlowParams purchaseParams = BillingFlowParams.newBuilder()
                    .setSku(skuId).setType(billingType).setOldSku(oldSku).build();
  mBillingClient.launchBillingFlow(mActivity, purchaseParams);

Should i declare explicit ProxyBillingActivity in manifest file? Thanks in advance!

1条回答
劫难
2楼-- · 2019-07-24 17:28

You should declare ProxyBillingActivity in your manifest file, like that:

<activity
   android:name="com.android.billingclient.api.ProxyBillingActivity"
   android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
   android:theme="@android:style/Theme.Translucent.NoTitleBar" />
查看更多
登录 后发表回答