当我试图运行我的应用程序内计费我得到的错误:“这个版本的应用程序没有配置通过谷歌播放计费。查看帮助中心获取更多信息”。
我已经在Manifest文件中有计费权限,我有一个签名的。apk作为草稿上传到谷歌Play上,我也已经在我的手机上安装了相同的签名apk。
有什么帮助可以解决这个问题吗?
当我试图运行我的应用程序内计费我得到的错误:“这个版本的应用程序没有配置通过谷歌播放计费。查看帮助中心获取更多信息”。
我已经在Manifest文件中有计费权限,我有一个签名的。apk作为草稿上传到谷歌Play上,我也已经在我的手机上安装了相同的签名apk。
有什么帮助可以解决这个问题吗?
当前回答
我的问题是,我试图用调试检查它。密钥库,我是说在eclipse中运行它。我将它与我在alpha模式下发布的密钥存储库一起导出(在您可以测试它之前必须发布它)。把它安装在我的手机里,然后我就可以正常测试了。
其他回答
解决方案
在play store上传应用后请稍等,因为谷歌需要一段时间来更新应用版本。它会起作用的!
啊,经过几个小时的尝试,终于找到了解决方案。
谷歌需要一段时间来处理应用程序并将它们更新到服务器,对我来说大约需要半天。因此,在谷歌Play上以草稿形式保存apk后,你必须等待几个小时,应用内产品才能正常响应,并允许定期购买。 导出并签署APK。未签名的APK试图进行购买将得到错误。
如果你发布的版本与你在手机上测试的版本不一样,也会发生同样的情况。
例如,上传的版本是android:versionCode="1",而你在你的手机上测试的版本是android:versionCode="2"
如果所有的设置都是OK的,你仍然得到错误的应用程序的这个版本没有配置通过谷歌播放计费。查看帮助中心获取更多信息。
在Play Store中编辑您的应用内产品定价或停用并激活应用内产品。这将解决问题。
与SO和其他网站上的许多答案和评论相反,你不需要使用从谷歌Play下载到测试设备上的产品alpha/beta版本进行初步测试(alpha/beta发布过程通常要花半天时间)。你也不需要从你的开发工作室加载和重新加载一个签名的apk到你的测试设备。
You CAN debug preliminary Google Play in app billing services using the debug app as loaded from your developer studio directly to your test device via ADB. If you are experiencing errors that prevent this, likely you have done something wrong in your code. Pay especially close attention to the CASE of your SKU's (product ids) and their format (for example, if you load your APK as com.mydomain.my_product_id, be sure your try to purchase it this way - providing the same case and domain). Also, pay especially close attention to your itemType - this should be either "inapp" or "subs" for managed/unmanaged in app purchases or subscriptions, respectively.
As suggested by Chirag Patel, provided you have your billing code properly established, perform all testing using the android.test.purchased Sku (product ID) during your preliminary tests. Check for this ID throughout your billing operations to pass it through signature, token and payload checks, since this data is not provided by the Google test system. Additionally, give one of your test products this ID to test its purchase, unlock/load and presentation all the way through your schema. To CLEAR the purchase, simply consume it, passing the same Sku AND a token string formatted this way - no other fields are relevant :
"inapp:"+appContext.getAppContext().getPackageName()+":android.test.purchased";
Once you have completed this phase of testing, move to semi-live testing with your alpha/beta product. Create a Google group (essentially a mailing list), add your test users emails to it, and add/invite this group to test your device in this phase (performed at the "APK" portion of your app's Google developer listing). Purchases will be simulated but not actually charged - however to clear and re-test the purchases, Google indicates that you must refund them from your Google wallet. THIS is the only phase of testing that requires the time-consuming process of using alpha/beta loads and test users.