简体   繁体   English

应用内结算错误

[英]In-app Billing Error

My [UNMANAGED] in-app purchase won't work, Before it works perfectly which I can purchase successfully using Test Accounts. 我的[UNMANAGED]应用内购买无法正常运行,在此之前,我可以使用测试帐户成功购买。 But it suddenly won't work, as I remember what I did to Merchant Account is only add more 2-4 Test Accounts. 但这突然失效了,因为我记得我对商家帐户所做的只是添加了2-4个测试帐户。 Then after adding, my in-app purchase won't work. 然后,添加后,我的应用内购买将无法使用。 So I updated the public key and upload an Apk as draft. 因此,我更新了公钥并上传了Apk作为草稿。 But still won't work. 但仍然行不通。

When the app is in google play page I received a LogCat error: 当应用在Google播放页面中时,我收到LogCat错误:

11-20 17:00:18.840: E/Finsky(2182): [187] FileBasedKeyValueStore.delete: Attempt to delete 'paramsqE9ZgJf5Z6GeZu1wwGPosw' failed!

Then when I click the Buy & Accept button I only received these LogCats: 然后,当我单击“购买并接受”按钮时,我仅收到以下LogCat:

11-20 17:00:39.520: I/BillingService(2408): handleCommand() action: com.android.vending.billing.RESPONSE_CODE
11-20 17:00:39.520: I/LoginActivity(2408): purchase was successfully sent to server

I am expecting for Security Verification's Logs and onPurchaseStateChange(...) to called, but I don't get any onPurchaseStateChange. 我期望Security Verification's LogsonPurchaseStateChange(...)被调用,但是我没有任何onPurchaseStateChange。

Please help me with this problem. 请帮我解决这个问题。

Also when I test android.test.purchased the reserved product IDs for testing static in-app billing responses but still got the same Logs/Responses. 另外,当我测试android.test.purchaseed the reserved product IDs for testing static in-app billing responses ,仍然获得了相同的日志/响应。

UPDATES----------------------- 更新 - - - - - - - - - - - -

I removed some Test Accounts but leaving only two (as suggested by @Tigger below). 我删除了一些测试帐户,但只剩下两个(如下面的@Tigger所建议)。 And now I'm not getting any error from Google page . 现在我没有从Google页面收到任何错误。 But still the onPurchaseStateChange() function didn't fire. 但是onPurchaseStateChange()函数仍然没有触发。 And I didn't receive any Logs from Security.java . 而且我没有从Security.java收到任何日志。

The last Log I received is: "purchase was successfully sent to server" 我收到的最后一个日志是: “购买已成功发送到服务器”

This may not be a correct answer, but from my personal testing and notes taken from all over the place: 这可能不是一个正确的答案,但从我的个人测试和各地的笔记中可以得出:

  • The draft app you upload must have the same "version code" and "version name" as any that you are testing. 您上传的草稿应用程序必须具有与要测试的应用程序相同的“版本代码”和“版本名称”。
  • If you upload a new version (with a new "version code" or "version name") it can take 4 to 24 hours before the new version will work correctly for testing. 如果您上载新版本(带有新的“版本代码”或“版本名称”),则新版本可能需要4到24小时才能正常运行以进行测试。
  • Double check that the account used on the device is in fact one of the test accounts. 仔细检查设备上使用的帐户是否实际上是测试帐户之一。
  • Your draft APK that you upload must be signed with the same key that will be used on the final version. 您上传的APK草稿必须使用与最终版本相同的密钥签名。
  • For testing on a device (the emulator will not work with the Play Store), so long as the "version code" and "version name" match the the draft APK in the Play Store, testing and debugging works. 对于在设备上进行测试(模拟器无法在Play商店中使用),只要“版本代码”和“版本名称”与Play商店中的草稿APK匹配,测试和调试就可以进行。

Hope that helps a little. 希望能有所帮助。

Edit : Some changes to clarify a few points. 编辑 :进行一些更改以澄清几点。

I had this error, but my mistake was that the upload behaviour has changed. 我遇到了这个错误,但是我的错误是上传行为已更改。

It used to be that you uploaded an APK as a draft to the production tab of the play store dashboard. 过去,您是将APK作为草稿上载到Play商店信息中心的生产标签中的。 Now, you have to upload to the Alpha tab of the dashboard, and publish your app ( http://developer.android.com/google/play/billing/billing_testing.html#draft_apps ). 现在,您必须上传到仪表板的Alpha选项卡, 然后发布您的应用程序( http://developer.android.com/google/play/billing/billing_testing.html#draft_apps )。

Don't worry if you're still in pre-production on your app; 如果您仍在制作中,请不要担心; if you have no APKs in the production tab when you publish, nothing will appear in the Play Store. 如果发布时生产标签中没有APK,那么Play商店中将不会显示任何内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM