意向未解决

发布于 2025-01-01 16:10:02 字数 1178 浏览 2 评论 0原文

在实施计费时不断出现此错误。到底是怎么回事?

01-30 22:33:31.600: E/Finsky(25902): [1] IntentUtils.createIntentForReceiver: Could not find receiver for com.example.game.android
01-30 22:33:31.610: D/Finsky(25902): [1] MarketBillingService.sendResponseCode: Response RESULT_USER_CANCELED cannot be delivered to com.example.game.android. Intent does not resolve.

显现:

        ...
        <activity android:name="com.paypal.android.MEP.PayPalActivity"
                  android:theme="@android:style/Theme.Translucent.NoTitleBar"
                  android:configChanges="keyboardHidden|orientation"/>
</application>
    <uses-permission android:name="com.android.vending.BILLING" />

    <service android:name=".api.billing.BillingService" />

<receiver android:name=".api.billing.BillingReceiver">
  <intent-filter>
    <action android:name="com.android.vending.billing.IN_APP_NOTIFY" />
    <action android:name="com.android.vending.billing.RESPONSE_CODE" />
    <action android:name="com.android.vending.billing.PURCHASE_STATE_CHANGED" />
  </intent-filter>
</receiver>

Keep getting this error while implementing billing. What is going on?

01-30 22:33:31.600: E/Finsky(25902): [1] IntentUtils.createIntentForReceiver: Could not find receiver for com.example.game.android
01-30 22:33:31.610: D/Finsky(25902): [1] MarketBillingService.sendResponseCode: Response RESULT_USER_CANCELED cannot be delivered to com.example.game.android. Intent does not resolve.

Manifest:

        ...
        <activity android:name="com.paypal.android.MEP.PayPalActivity"
                  android:theme="@android:style/Theme.Translucent.NoTitleBar"
                  android:configChanges="keyboardHidden|orientation"/>
</application>
    <uses-permission android:name="com.android.vending.BILLING" />

    <service android:name=".api.billing.BillingService" />

<receiver android:name=".api.billing.BillingReceiver">
  <intent-filter>
    <action android:name="com.android.vending.billing.IN_APP_NOTIFY" />
    <action android:name="com.android.vending.billing.RESPONSE_CODE" />
    <action android:name="com.android.vending.billing.PURCHASE_STATE_CHANGED" />
  </intent-filter>
</receiver>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

北方。的韩爷 2025-01-08 16:10:02

服务和接收者需要位于应用程序标签中!

        ...
        <activity android:name="com.paypal.android.MEP.PayPalActivity"
                  android:theme="@android:style/Theme.Translucent.NoTitleBar"
                  android:configChanges="keyboardHidden|orientation"/>
        <service android:name=".api.billing.BillingService" />

        <receiver android:name=".api.billing.BillingReceiver">
            <intent-filter>
                <action android:name="com.android.vending.billing.IN_APP_NOTIFY" />
                <action android:name="com.android.vending.billing.RESPONSE_CODE" />
                <action android:name="com.android.vending.billing.PURCHASE_STATE_CHANGED" />
            </intent-filter>
        </receiver>
    </application>
    <uses-permission android:name="com.android.vending.BILLING" />

The service and receiver need to be in the application tag!

        ...
        <activity android:name="com.paypal.android.MEP.PayPalActivity"
                  android:theme="@android:style/Theme.Translucent.NoTitleBar"
                  android:configChanges="keyboardHidden|orientation"/>
        <service android:name=".api.billing.BillingService" />

        <receiver android:name=".api.billing.BillingReceiver">
            <intent-filter>
                <action android:name="com.android.vending.billing.IN_APP_NOTIFY" />
                <action android:name="com.android.vending.billing.RESPONSE_CODE" />
                <action android:name="com.android.vending.billing.PURCHASE_STATE_CHANGED" />
            </intent-filter>
        </receiver>
    </application>
    <uses-permission android:name="com.android.vending.BILLING" />
南烟 2025-01-08 16:10:02

我遇到了同样的问题,但有不同的解决方案:我忘记了包含。在我的<接收器>标签。它看起来像这样:

    <receiver android:name="com.blah.blah.blah.MessageReceiver">
     <action android:name="com.android.vending.billing.IN_APP_NOTIFY" />
     <action android:name="com.android.vending.billing.RESPONSE_CODE" />
     <action android:name="com.android.vending.billing.PURCHASE_STATE_CHANGED" />                 
    </receiver>

这个故事的寓意:仔细检查你的清单!

I had the same problem, but a different solution: I had forgotten to include an <intent-filter> in my <receiver> tag. It looked like this:

    <receiver android:name="com.blah.blah.blah.MessageReceiver">
     <action android:name="com.android.vending.billing.IN_APP_NOTIFY" />
     <action android:name="com.android.vending.billing.RESPONSE_CODE" />
     <action android:name="com.android.vending.billing.PURCHASE_STATE_CHANGED" />                 
    </receiver>

Moral of the story: double check your manifest!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文