Reputation: 7128
When I try to run my application with in-app billing I am getting the error: "This version of the application is not configured for billing through Google Play. Check the help center for more information".
I have the billing permission already in the Manifest file and I have a signed .apk uploaded as a draft onto Google Play and I have also installed that same signed apk onto my phone.
Any help on how to solve this issue?
Upvotes: 389
Views: 200501
Reputation: 299
I am sharing the post below which helped me fix my problem. https://stackoverflow.com/a/66022981/12531078
However, there was another problem at play. It was this one particular step which I missed which wasted most of my time.
I don't know if this was a silly oversight on my end, but I wish to help anyone who is still stuck in this billing process. Do verify if you have done this step as well from your end.
Make sure that you tick the checkbox of your licence testers email list and save the changes by clicking the blue button below.
Upvotes: 6
Reputation: 146
Make sure of the following is taken care of :
Upvotes: 2
Reputation: 5670
This error may be caused by several reasons.
Here is the list of requirements for the Google IAB testing.
Prerequisites:
Testing requirements:
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, @Kyone, @MinosL for updates
Upvotes: 422
Reputation: 161
I was stuck on this issue for days, I had attempted to deploy to play console and test on my phone again and again.
i had 2 test phones and there were 2 different main accounts but i forgot what is the main account is so if you have more than 1 account sign in to your Google Play. make sure you have added your main account to the testers list on google app console
you can also try to add all of the accounts to make sure that the issue is not related to different google accounts.
Upvotes: 2
Reputation: 325
The trick for me was realizing that the License Tester email I added to Google Play Console needs to match the email address that's associated with the device, which is found in the device Settings app under "About Phone -> Google Account".
The email addresses under "Settings -> Google" and in the Play Store app don't count, and can even be different than the email address associated to the device, which apparently can only be changed by factory reset.
Upvotes: 3
Reputation: 3235
If you're here from 2018, you need to download the APK directly from Play Store and install the "derived" APK. Maybe it is because of Google's Play Store has a feature "App Signing by Google Play".
Still a possible solution in the year 2023.
Upvotes: 22
Reputation: 787
In my case:
(Playconsole > Setup > Licence testing)
com.android.vending.BILLING
to the manifest and upload app for internal testing or productionUpvotes: 0
Reputation: 1145
2023
In my case
i just update the compileSdkVersion = 31 to compileSdkVersion = 33 and targetSdkVersion = 31 to targetSdkVersion = 33
compileSdkVersion = 33
targetSdkVersion = 33
Because the latest version of Android is 13
Before the upgradation, I received this
then perfectly it worked fine
Upvotes: 2
Reputation: 1913
I have the same issue when installing on the device directly from the IDE (debug or release mode - doesn't matter).
But when I put the app on the Google Play marketplace, and then installed the app from this marketplace on the same phone (previously uninstalling the "ad hoc" version intalled directly on the device from the IDE), and IAP started working.
But when I debug AFTER installation, I get the signing key mismatch, have to uninstall the app from the phone, then debug works, but IAP doesn't work again... Frustrating, but you have to have installed the app from the marketplace as it turns out.
Upvotes: 0
Reputation: 207
All answers are valid according to their situation, but my case was different of all. I'm using revenuecat and some configuration was wrong.
It will then take 36 hours to enable revenuecat API for this project.
Upvotes: 0
Reputation: 2883
This is tested for debug/release builds & either if the app is signed by Play Signing (which means the signing certificate of the delivered app from Google Play is different from the certificate when installing the app from your machine using Android Studio).
check these following steps:
I tested that on two different Google Play Console accounts (two different apps), and it works.
Upvotes: 13
Reputation: 22394
In the old developer console:
Settings
-> Account details
-> License Testing
-> Gmail accounts with testing access and type here your accounts
In new developer console:
Setup
-> License Testing
-> Type your Gmail account, hit 'Enter' and click 'Save'.
Upvotes: 115
Reputation: 11
If all the settings are OK and still you are getting the error This version of the application is not configured for billing through Google Play. Check the help center for more information.
Edit your In-App Products pricing in the Play Store or deactivate and activate the In-App products. This will solve the issue.
Upvotes: -1
Reputation: 11
If you wanted to integrate with another app that is not published but has the same id, version code, and version name of deployed one so don't forget to edit appname.iml file version in flutter app because I stuck on to it with the same error.
Upvotes: 1
Reputation: 5404
Conclusions in 2021
For all of you who concerned about debugging - You CAN run and debug and test the code in debug mode
Here's how you can test the process:
(This of course relies on the fact that you have already added and activated your products, and your code is ready for integration with those products)
I did the above and it is working just fine.
Upvotes: 48
Reputation: 5317
SOLUTION
Just hold on a while after uploading your app on play store because google takes some time to update app versions.It will work !
Upvotes: 1
Reputation: 10539
Recently google has implemented a change on their systems, and since you have uploaded at least one APK to your console, you can test your in-app requests with your app with any version code / number.
Cross reference LINK
Configure
gradle
to sign your debug build for debugging.
android {
...
defaultConfig { ... }
signingConfigs {
release {
storeFile file("my-release-key.jks")
storePassword "password"
keyAlias "my-alias"
keyPassword "password"
}
}
buildTypes {
debug {
signingConfig signingConfigs.release
...
}
}
}
Upvotes: 1
Reputation: 3016
Another reason not mentioned here is that you need to be testing on a real device. With the emulator becoming really good, it's an easy mistake to make.
Upvotes: 1
Reputation: 21
Had the same problem, and it was not solved before i read the post from DZDomi. It suddenly occurred to be that there is a setting in the Google Developer Console that you need to enable. In the "In app purchases" section, there's a line for your product and to the far right there's a status for it. It should be ACTIVE!
Upvotes: 2
Reputation: 1679
The problem also occurs, when you have added an in-app purchase after you uploaded the apk, but you have not published the application in the play store (alpha, beta and production).
Which basically means, that you have to add the In-App purchase AFTER you have published the apk in the Play store (alpha, beta and production). Otherwise you wont be able to purchase or query for the In-App purchase.
Upvotes: 0
Reputation: 958
Contrary to many answers and comments on SO and other sites, you do NOT have to perform preliminary tests with an alpha/beta version of your product that has been downloaded from Google Play onto your test device (the alpha/beta publication process often eats up half a day). Neither do you have to load and re-load a signed release apk from your developer studio to your test device.
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.
Upvotes: 3
Reputation: 685
Let me just add what happened with me, may help some one.
It was mainly due to signing.
Since I have added the signing details in the Project structure, I was thinking that every time when I run, expected signed apk is getting installed. But build type 'debug' was selected.
Below fix solved the problem for me.
Upvotes: 4
Reputation: 1368
If you want to debug IAB what do you have to do is:
Submit to google play a version of your app with the IAB permission on the manifest:
Add a product to your app on google play: Administering In-app Billing
Set a custom debug keystore signed: Configure Eclipse to use signed keystore
Upvotes: 1
Reputation: 6461
my problem was that i tried to check it with the debug.keystore , i mean running it through eclipse.I exported it with the keystore with which i published in alpha mode(it must be published before you can test it).installed it in my phone and than i could test it normally.
Upvotes: 0
Reputation: 11508
You need to sign your APK with your live certificate. Then install that onto your test device. You can then test InAppBilling. If you are testing your application by direct run via eclipse to device(In debug mode) then you will get this error.
If you are using android.test.purchased
as the SKU, it will work all the way, but you won't have the developerPayload in your final response.
If you are using your own draft in app item you can test all the way but you will be charged and so will have to refund it yourself afterwards.
You cannot buy items with the same gmail account that you use for the google play development console.
Upvotes: 48
Reputation: 91
This will happen if you use a different version of the apk than the one in the google play.
Upvotes: 4
Reputation: 4451
In my case I saw the same message due to the different signatures of the installed apk and an uploaded to the market apk.
Upvotes: 2
Reputation: 7128
Ahh found the solution after trying for a couple of hours.
Upvotes: 210
Reputation: 41749
The same will happen if your published version is not the same as the version you're testing on your phone.
For example, uploaded version is android:versionCode="1"
, and the version you're testing on your phone is android:versionCode="2"
Upvotes: 150