91

Since a couple of days it's possible to use in-app-billing in Android apps. Very cool of course. So, I started working on a update for my application to implement this. But now I run into some problems. This is what I did:

  • I first tried the reserved product IDs for testing static in-app billing responses. That works without problems.
  • I uploaded a draft APK to the market (with production signing, no debug signing), that included the com.android.vending.BILLING permission.
  • When I did that I was able to add a 'In-app Products' to my app in the market and set it status to published.
  • I created a test user and reseted my device to make that test user the primary account on my test device.
  • The reserved product id's still work.

Now comes the problem. When I use my own product ID (the one I added before, see above) a dialog is shown with the following text:

"Application Error : This version of the application is not configured for Market Billing. Check the help center for more information."

There is nothing strange I can find in the log. Anyone knows what I'm doing wrong here?

Peter Fortuin
  • 4,462
  • 8
  • 36
  • 65

10 Answers10

157

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.

esilver
  • 25,374
  • 21
  • 112
  • 159
  • 8
    Debug versions are ok but they must be signed. – Barry Fruitman Jan 28 '12 at 03:19
  • 1
    is this necessary to publish the app for testing an inApp item. i have published the inapp item and kept the app unpublished. i apologies if the question is silly or unrelated. – Jana Feb 27 '12 at 12:18
  • @ jana no there is no need to publish app for testing in app but yes there is a need to publish the in-app product to be published other wise you will get an error on your device while testing in-app product "Item not found" – Usman Kurd May 24 '12 at 07:08
  • 21
    It's important to note, as in some of the other answers - the version code of your test app must be the same as the version code of your draft in Google Play. So if you started with a placeholder v1 in Google Play, then prepared the real app as v2 - that real app has to be uploaded to GP as a draft before you can finish testing it. – Steve Haley Mar 26 '13 at 10:57
  • In my case I uploaded version 1 apk in play store and there are no issue with in app feature,but now I developed version 2 apk which is signed with my own key and installed in my device for testing before put in play store then in app billing not working.Showing like: "this version of application is not configured for billing through google play". What is the issue here? – Shailendra Madda Oct 26 '13 at 08:33
  • 1
    Things have recently changed, and you now need to publish your app to the alpha channel on google play before IAP testing can continue. – tenpn Feb 11 '15 at 14:23
  • Can you help me with this [question](https://stackoverflow.com/questions/47438092/in-app-billing-connect-to-firebase-and-get-products) please? – StuartDTO Nov 27 '17 at 09:35
43

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".

Simon K
  • 449
  • 4
  • 3
  • I just wanted to re-affirm this answer worked for me. I was getting this error - even though the app versions were correct. I didn't do anything other than wait a few hours, and it started working correctly (I didn't see the error again). – Booger Jun 03 '12 at 19:41
  • 4
    I will second that: it worked for me also to wait a couple hours (actually waited overnight so I don't know the exact timing). As a small editorial comment, it's frustrating that Google couldn't give a more accurate error message for this and save us all a lot of trouble. – M Katz Jun 23 '12 at 22:45
  • Does this mean, i user with an app version older than the current, cant use in-app purchases, and has to update the app first ? – Kedu Oct 31 '14 at 09:24
34

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.

ashughes
  • 6,855
  • 8
  • 46
  • 53
22

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

jen_h
  • 321
  • 1
  • 3
14

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

user1444172
  • 151
  • 1
  • 6
  • 1
    I also discoverd that the version code should match. At least your testing version can not be higher that the one on Google Play. I'm not sure if the other way around is also true. I hope not, because that would mean that people with older version of the application can not use my in-app-billing. – Peter Fortuin Jun 10 '12 at 09:13
  • #3 was the trick. If you're sure everything is ok have a break and try later. It just needs some time to update :) – nuala Jun 11 '12 at 08:02
7

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

Community
  • 1
  • 1
Luten
  • 4,901
  • 4
  • 24
  • 23
5

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.

JaakL
  • 3,461
  • 4
  • 21
  • 36
0

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.

user1174195
  • 121
  • 1
  • 9
0

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

Nathan Prather
  • 1,968
  • 1
  • 16
  • 14
-2

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.

Farrell
  • 1
  • 1