gpt4 book ai didi

android - IInAppbillingService 不生成 java,serviceIntent 为空

转载 作者:行者123 更新时间:2023-11-29 14:17:43 25 4
gpt4 key购买 nike

我正在使用 Android Studio,并且正在学习应用内结算教程

http://developer.android.com/google/play/billing/billing_integrate.html

我还查看了这里的教程:

http://www.techotopia.com/index.php/Integrating_Google_Play_In-app_Billing_into_an_Android_Application_%E2%80%93_A_Tutorial

两个教程都说我必须将 IInAppBillingService.aidl 添加到非常严格的文件夹结构中,我相当确定我将它添加到正确的文件夹中,但我认为无论如何都没有生成 java 文件,至少我没有见过任何。这样做的效果是:

Intent serviceIntent = new Intent("com.android.vending.billing.InAppBillingService.BIND");

总是返回 null。

这是我的文件夹结构:

enter image description here

最佳答案

此 aidl 的正确包名称是 com.android.vending.billing

构建您的应用程序。您应该会在项目的 /gen 目录中看到名为 IInAppBillingService.java 的生成文件。

阅读更多信息 Adding the AIDL file to your project

关于android - IInAppbillingService 不生成 java,serviceIntent 为空,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28230280/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com