android billing inApp/subscription Unable to find explicit activity ProxyBillingActivity

别等时光非礼了梦想. 提交于 2019-12-24 02:12:06

问题


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:


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" />


来源:https://stackoverflow.com/questions/51393111/android-billing-inapp-subscription-unable-to-find-explicit-activity-proxybilling

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!