当我试图运行我的应用程序内计费我得到的错误:“这个版本的应用程序没有配置通过谷歌播放计费。查看帮助中心获取更多信息”。

我已经在Manifest文件中有计费权限,我有一个签名的。apk作为草稿上传到谷歌Play上,我也已经在我的手机上安装了相同的签名apk。

有什么帮助可以解决这个问题吗?


当前回答

2022答:

这是测试调试/发布版本&如果应用程序是由Play签名(这意味着从谷歌Play交付的应用程序的签名证书与使用Android Studio从您的机器安装应用程序时的证书不同)。

检查以下步骤:

Create your product on Google Play Console and activate it. Add license testers (open the Google Play Console -> Settings -> License Testing). Add all the Google accounts listed on your android device. Upload signed app to the internal testing track (it must be in release mode). Use the testing link to check if the app is available to download (make sure the uploaded app version to the internal track matches the version you're testing in debug mode). It takes some time to see the latest uploaded version there, so I recommend clearing the cache of the Play Store app. Run your app in debug mode from Android Studio. (Again, the app version and build number must match the values on the published version to the internal track).

我在两个不同的谷歌Play Console帐户(两个不同的应用程序)上进行了测试,它是有效的。

其他回答

这里没有提到的另一个原因是,您需要在真正的设备上进行测试。 随着模拟器变得越来越好,这是一个很容易犯的错误。

我的问题是,我试图用调试检查它。密钥库,我是说在eclipse中运行它。我将它与我在alpha模式下发布的密钥存储库一起导出(在您可以测试它之前必须发布它)。把它安装在我的手机里,然后我就可以正常测试了。

如果所有的设置都是OK的,你仍然得到错误的应用程序的这个版本没有配置通过谷歌播放计费。查看帮助中心获取更多信息。

在Play Store中编辑您的应用内产品定价或停用并激活应用内产品。这将解决问题。

如果你发布的版本与你在手机上测试的版本不一样,也会发生同样的情况。

例如,上传的版本是android:versionCode="1",而你在你的手机上测试的版本是android:versionCode="2"

2021年结论

对于所有关心调试的人,您可以在调试模式下运行、调试和测试代码

下面是你如何测试这个过程:

(当然,这取决于您已经添加并激活了您的产品,并且您的代码已经准备好与这些产品集成)

将com.android. selling . billing添加到清单中 上传签名apk到内部测试 添加许可证测试员(播放控制台->设置->许可证测试)-如果你在你的设备上使用多个帐户,你不确定使用哪一个,只需将它们都添加为测试员。 像往常一样,从Android Studio运行应用程序(*应用程序应该具有与您刚刚上载到内部测试的应用程序相同的版本代码)

我做了上面的事情,它工作得很好。