应用程序错误: 此版本的应用程序没有配置为市场计费

几天之后,在 Android 应用程序中就可以使用应用程序内计费了。当然很酷。因此,我开始为我的应用程序进行更新,以实现这一点。但现在我遇到了一些问题。我就是这么做的:

  • 我首先尝试了用于测试静态 in-app 的保留产品 ID 计费响应。这没有问题。
  • 我向市场上传了一个 APK 草案(带有生产签名,没有调试签名) ,其中包含 com.android.vending.BILling 权限。
  • 当我这样做的时候,我能够添加一个“应用程序内产品”到我的应用程序在市场上,并设置它的状态发布。
  • 我创建了一个测试用户,并重置了我的设备,使该测试用户成为我的测试设备上的主要帐户。
  • 保留的产品 ID 还能用。

现在问题来了。当我使用我自己的产品 ID (我之前添加的那个,见上文)时,会显示一个对话框,其中包含以下文本:

应用程序错误: 此版本的应用程序没有配置为市场计费。查看帮助中心以获得更多信息。

记录里没有什么奇怪的地方,有人知道我做错了什么吗?

33958 次浏览

I just encountered this issue and realized it was because I was running a debug, unsigned version of my app. In Eclipse, when I exported and signed my application and installed it on the phone, then I was able to use my in-app products without seeing this error message.

I also ran into this problem. I finally realized that my published app had a versionCode of 3, my draft (unpublished apk with the Billing permission) had a versionCode of 4, and the signed apk I was using to test in-app billing was still at versionCode 3. Once I changed the versionCode to 4, I was able to get through to the actual in-app product page for the purchase I was requesting.

This can happen on signed, released builds when the apk uploaded as a draft does not match the apk running on your system in test mode. Just make sure that your builds match up, you should be alright in test mode and will stop seeing the errors.

The big worry here is that we'll see this same behavior in production, i.e., we release 1.0.0-1 with in-app billing, then we release 1.0.0-2, and users running 1.0.0-1 will be unable to purchase or have their purchases restored and will receive the same error (very bad user experience). Have been scouring the docs for mention of this behavior as specific to test-mode, but no luck so far; we've added a bug here: http://code.google.com/p/marketbilling/issues/detail?id=15#c0

My solution was that I needed to use the same key to sign apk in Market (as draft APK), and in test. So instead of just Run Application I always have to export signed APK with every update, uninstall and reinstall it in device using apk command-line commands. In principle you can use your own keystore as debug keystore also, but it requires using specific hardcoded passwords and names for keys.

I have found that once I upload a new copy of my APK to the market, then I experience that "application error" during course of the next hour or so. After at least one hour has gone by (sometimes up to two hours need to have gone by), then I no longer get that error anymore and I can then purchase my items without any problems. It seems that the Google servers need at least an hour to process the fact that you have uploaded a new APK (with regards to the InApp Billing aspect of the APK).

So my advice is for you to wait 1 to 2 hours after uploading your APK, and then see if you still get the "application error".

I also encountered the same issue...but now issue is solved

My observations based on few trials:

  1. The version code should match both on the Google Play and the Device
  2. Even though versions match, we may still get this error
  3. Wait about 1 to 2 hrs then try, we will not get this error

Hope this helps

Thought I'd share one more possible solution if you're getting this error. I originally uploaded to google a draft of my apk with the billing permission enabled, so I was able to set up in app purchasables. Later on I uploaded another apk without the billing permission missing from my AndroidManifest, which resulted in the error. Definitely seems like an unlikely case, but it happened for me so it's possible.

Edit: Along the same fold, if the version you have submitted as draft to google is unsigned, the error will also occur.

To throw in my two cents, I was able to test it by uploading to the Beta version and creating a Gmail account with testing access under the settings tab with a new version of my app...

I'm now moving it to production...

Thanks! Nathan

Old thread, but adding my experience...

I installed an apk with a versionCode 1 higher than was in the store. Played it on 2 different accounts on my Nexus 7 and experienced this problem. So I uninstalled and reinstalled from the store to make sure the versionCode matched. Even waiting overnight the error didn't clear.

Turns out I needed to uninstall from all 3 google accounts I have tied to my Nexus 7. It recovered when I uninstalled the app explicitly from all three accounts on my nexus 7 then reinstalled from the store.

Copied from duplicate question: https://stackoverflow.com/a/22469253/1321401

This error may occur for several reasons.
Here is the list of requirements for the Google IAB testing.

Prerequisites:

  1. AndroidManifest must include "com.android.vending.BILLING" permission.
  2. APK is built in release mode.
  3. APK is signed with the release certificate(s).
  4. APK is uploaded to alfa/beta distribution channel (previously - as a draft) to the developer console at least once. (takes some time ~2h-24h).
  5. IAB products are published and their status set to active.
  6. Test account(s) is added in developer console.

Testing requirements:

  1. Test APK has the same versionCode as the one uploaded to developer console.
  2. Test APK is signed with the same certificate(s) as the one uploaded to dev.console.
  3. Test account (not developer) - is the main account on the device.

P.S: Debugging with release certificate: https://stackoverflow.com/a/15754187/1321401 (Thnx @dipp for the link)

P.P.S: Wanted to make this list for a long time already.

Thnx @zlgdev for update