I was having problems earlier implementing in-app billing for android. I have fixed that issue, but following that is another issue. When I run the application on my phone and another test account phone, I get the error: "This version of the application is not configured for Market billing." I have installed the new version of the app to the Android market as an APK and added the items. When it opens the in-app billing, it shows the name of the item to purchase from the Android market, but gives me the error. When I tried the static example from Google, that worked.
Thanks
To get this to work you need to sign the package with your release key/certificate, upload to the Market and save it (without activating). Then install the release APK to your device to be able to test. The APK you install on the phone has to have the same version and be signed with the same certificate for IAB testing to work. Details here.
Related
I have been trying to test the purchasing of Play store subscriptions on my device, but I have not succeeded despite following several step-by-step guides[1][2][3].
My ultmate aim is to test subscriptions on my USB connected device by building and installing the app with Android Studio. Unfortunately, it seems my only option right now is to to publish the app to the Alpha track on the Play Store, wait a few hours and download it every time I make a change.
The subscription products are queried successfully using BillingClient.querySkuDetailsAsync, but when I launch the billing flow (via BillingClient.launchBillingFlow) I see the following alert on the screen:
Error
This version of the application is not configured for billing through Google Play. Check the help centre for more information.
OK
I also see the following in the console:
W/ProxyBillingActivity: Activity finished with resultCode 0 and billing's responseCode: 5
W/BillingHelper: Couldn't find purchase lists, trying to find single data.
W/BillingHelper: Received a bad purchase data.
Couldn't find single purchase data as well.
The response code 5 indicates a developer error:
Invalid arguments provided to the API. This error can also indicate that the application was not correctly signed or properly set up for In-app Billing in Google Play, or does not have the necessary permissions in its manifest.
My app is published to Internal, Alpha and Beta release tracks with the same version name and version code as the locally built APK. In the Play console, I have created a License Tester and added it to the Alpha track's testers, then opted the tester in to the Alpha track via a link. On my device, I am logged in with the tester's Google account.
I have tried building an APK signed with the release certificate, with a matching version name & code to the APK published in the store. I was at first using the "Run" and "Debug" buttons in Android Studio, but discovered that they built an unsigned[7] APK no matter how I configured the signing configs. Instead, I build using the Build->Make Project menu item, and install the resulting signed APK using ADB[5]. The "Active Build Variant" is set to "Release".
It occurred to me that it may be impossible to sign a locally built APK with the same key as the APK distributed by the Play store, as my app has "Play App Signing" enabled (which causes Google to re-sign the APK using a different key, which is inaccessible to me). However, there is a thread on StackOverflow which suggests other have had success even when using Play App Signing[6].
I have also tried waiting several days between publishing a new build to the Alpha track and trying to purchase a subscription, as I read that the Play Store sometimes takes up to 24 hours to process builds.
I am using Android Studio 4.2 on MacOS 10.15.7, with a Samsung A5 phone for testing.
[1] Selling subscriptions
[2] Testing in-app purchases on Android
[3] Checklist on Stack overflow
[4] "Run" with signed APK
[5] Install an APK via ADB
[6] Testing In-App payments with Play App Signing enabled
[7] Verifying an APK is signed
Update 2022
I never found workaround for this on my Samsung A5 running Android 8. However, I purchased a Samsung A52 (running Android 12) and it does not exhibit this problem.
you need to increase the version and upload that version as beta publish.
mostly duplication
please check This version of the application is not configured for billing through Google Play
If two apps differ in the signing key or in the package, then Google Play considers them different applications
Both debug & release versions should use the same signing key, I can make test purchases while debugging via USB on Android Studio with no problemas
something like this on the app build.gradle :
buildTypes {
release {
signingConfig signingConfigs.mykey
debuggable false;
....
}
debug {
debuggable true
signingConfig signingConfigs.mykey
....
}
}
There's a utility called "lucky patcher" which modifies app code in order to allow for bypassing in app purchases (yes, it's used for piracy, but I'm pretty sure it's not piracy to bypass your own app). You could try using it to test your app.
And in case you haven't already, once you're done, protect against it by following this: Lucky patcher, how can I protect from it?
when we try to update our compiled app over the old app(installed from amazon store) on Kindle, we get this error:
Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]
We have verified versionCode that increased, the package name is the same. We think we signed with the same key.
Could please anyone help me? I am new to Android though.
I saw this same error message when attempting to test the upgrade process of our application on Kindle devices accessing the Amazon App Store. I was locally building and signing the app and deploying via $ adb. I ensured that the build configuration was the same (i.e. -release) and that the version number had been incremented properly, but I was still receiving the error upon installation until the application was completely uninstalled. Forcing our users to uninstall for the upgrade was not an acceptable delivery mechanism.
Strangely, the issue did not occur when testing the same process on Samsung devices accessing the Google Play store. The source of the issue for me turned out to be the fact that Amazon removes your developer signing from uploaded .apk files and re-signs your built application with a different key store. Once our update got accepted for publishing, we were able to confirm that the upgrade worked as expected without having to uninstall the app.
I am trying to purchase using a beta tester but i am getting this error.
This is an error that shows in google play window, after passing initial validations and after the user press subscribe button, so i guess it is not an code or configuration error.
Anyway i checked this link https://stackoverflow.com/a/22469253/2700303 and also downloaded the app from the store.
I check the "Learn more" link that comes with the error but nothing on that troubleshooting page helped.
The account used as a valid and active pay method.
I am running on a simulator, but google play comes with it for a reason, so i discard that also.
The rest of the suggestions say to use other device. My simulator is running API 28 so should be good enough.
In-app purchase must be tested with production build on real device.
Steps
Generate release build from Android studio.
Uninstall debug app from your device, or use adb uninstall.
adb uninstall {yourdomain}.{yourpackagename}
Install your release version to your device.
adb install app-release.apk
Update:
Check this answer for more details.
Update 2 :Please read more about Test Google Play Billing
So I have an app on the Play Store that I released about a week ago. I've done a ton of work to to it since and I'm basically going to rebrand it a bit.
When I first released the app, I put it up on the app store with the name "First Name of App" (obviously not the correct name). I now have an update ready to publish with a lot of changes, and one change is that the app name is now "Second Name of App". It's all under the same package yet, I just changed the name using the Manifest.
I'm having an issue though with testing. Currently on my own phone, I have the version of the app that is currently on the Play Store installed.
I generated a signed APK using Android Studio (all with the same settings and key passwords and such). I then put that signed apk on my phone for testing, and when I try to install it I get the "App not installed" message.
Things I have tried:
Uninstalling the previous APK and then installing the newer version. If I uninstall the Play Store version first, and then install the newer signed APK version, it installs fine. The problem with this though is that I lose the data that I had in the Play Store version. I can't have that.
Changing the "versionCode" and "versionName" numbers in the build.gradle. I made sure both numbers are higher than what the Play Store version is, but I still get the same "App not installed" message.
Making sure the settings while generating the signed APK are the same. All of the settings are exactly the same. The signature version checkboxes are both checked yet also, as they were with all previous versions.
Anyone have any ideas what could be going on? I really would like to release this update but I'm afraid if I just upload this signed apk to the store that everyone would have the same issue, and that they'd be forced to uninstall the current version they have (resulting in data loss).
The problem seems that you are trying to install an APK with the same package name but different key and that creates a conflict. Android only considers an App to be the same if both package name and key signature are identical.
Keys are unique, even if you use the same settings and passwords each time you create a key a new unique key is created and it will be always different to the key you used in the Play Store release.
The only way to install the APK is to uninstall the Play Store version.
And that serves to emphasize how important it is to keep the key used in the Play Store, if you lose it you will not be able to upload new updates.
UPDATE
If your have "Google Play App Signing " activated for you app, the key used when an user installs the app from Play Store is different than the one you used to upload the release to the Play Console.
https://support.google.com/googleplay/android-developer/answer/7384423?hl=en
Have you by chance changed the minimum SDK version or anything like that? I've had a similar issue. I've an app on the PlayStore which I tried upgrading with an APK with the same signature as that of the PlayStore version but a different minimum SDK version. When I tried installing I get the 'app not installed' error. I then uploaded this APK on the PlayStore. On my device, the app on the PlayStore now shows two options 'Uninstall' and 'Open'. Due to your conflict, users will have to first uninstall the app and install it again. There will be no 'Update' option due to the conflict. Hope this helps :)
Similar Issue
Android Phone: Google Pixel3, Android 9
install youtube apk, but error:
Application Not Installed = App Not Installed
Final Solution
use adb's pm to install apk
even same error, but can show/known the fail reason
then can find specific solution to fix it
Examples
here later encounter many error cases:
blueline:/storage/emulated/0/Download # pm install /data/local/tmp/com.google.android.youtube_16.29.36.apk
pm install /data/local/tmp/com.google.android.youtube_16.29.36.apk
Failure [INSTALL_FAILED_VERSION_DOWNGRADE]
or:
blueline:/data/local/tmp # pm install youtube_16.29.36_addedDebuggable.apk
pm install youtube_16.29.36_addedDebuggable.apk
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Failed to collect certificates from /data/app/vmdl445467286.tmp/base.apk: Attempt to get length of null array]
then google it and find specific solution to fix it, install apk successfully.
I am used to develop the app using InAppPurchase(IAP) billing api .
I already uploading app it's works fine. After 1 month i run the previously uploaded app in my Eclipse shown the following dialog shown
please see the below screenshot once
Error
This version of the application is not configured for billing through Google Play. Check the help center for more information.
I didn't understand what mistake I've done.
Are you testing signed APK? To test InApp purchase you need to use signed APK. I got the same error when i installed unsigned apk in device. Also make sure you have updated google play installed in your device.
Thanks
You have to create google developer account where you will get api key and you can download inapp jar.
Visit : https://developer.android.com/google/play/billing/index.html?hl=d