Android – In-app Billing – Item requested not available for purchase

androidin-app-billingin-app-purchase

I am working on learning in-app billing but I am having a problem with the google's in-app billing example, the Dungeon one.

I have already set up the application, added my public key, and changed the API_VERSION to 1 in the makeRequestBundle().

I have already exported and signed the application and uploaded it onto Google Play and saved it as a draft with a few pictures and activated the apk. I also added both the sword_001 and potion_001 as published in-app purchases!

Next I installed the signed app onto my phone but when I try to purchase either the sword or the potion I get an Item unavailable error

The item you requested is not available for purchase.

I even tried on a different device to make sure it wasn't because developer's can't purchase their own products, and I get the same message on both devices.

What have I missed?

Best Answer

Check your versionCode. It can't be higher than the last published/unpublished version in any of your distribution channels (prod/beta/alpha).