问题描述
尝试在 Google Play 管理中心内创建订阅时,我收到一条消息 To add in-app products,you need to add the BILLING permission to your APK
,我相信我已经完成了。
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="com.android.vending.BILLING" />
</edit-config>
而且我已经安装了 in-app-purchase-2 插件 (https://ionicframework.com/docs/native/in-app-purchase-2) 并添加了此处提到的计费密钥:https://github.com/j3k0/cordova-plugin-purchase/wiki/Setup-for-Android-Google-Play#add-android-billing-key 但 google play 控制台仍然给出错误。>
当我在 App Bundle Explorer(在 Google Play Console 中)查看上传 APK 时,我可以看到权限中列出了 com.android.vending.BILLING
(下附图片)。这让我相信我已经正确地授予了权限。但是,列表中的其他权限没有 com.android.vending
前缀。相反,他们有 android.permission
但我还没有看到任何 cordova
文档可以使用除 com.android.vending
以外的任何内容。
我该如何解决这个问题?
我正在使用带有cordova-android ^9.1.0的Ionic 5
解决方法
我执行了以下任务,问题已自行解决:
- 上传了“发布”APK(不是“调试”APK)
- 将新 APK 发布为“封闭测试”而非“内部测试”