我正在使用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。

这是我的文件夹结构:

最佳答案

此帮助的正确软件包名称是com.android.vending.billing

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

Adding the AIDL file to your project阅读更多

07-24 09:47
查看更多