New SHA1-key for Google Maps V2 - android

I used debug SHA1-key for testing in-App purchases in Google Play. But with debug key not working Google Maps V2, I only see a gray screen instead of cards. I generated the release key, build new apk file and now i can`t upload this file to Google Play.
Upload failed You uploaded an APK that is signed with a different certificate to your previous APKs. You must use the same certificate. Your existing APKs are signed with the certificate(s) with fingerprint(s):
SHA1: XX:XX:XX..XX
and the certificate(s) used to sign the APK you uploaded have fingerprint(s):
SHA1: YY::YY:YY…YY
Does anyone have any idea how to do in this situation?

As you have generated the key with the debug SHA-1 it will not allow any application to uploaded on market which has debug key. Try to generate your key with release certificate fingerprint.
AFAIK for the previous apk generation you have used the release certificate fingerprint and right now for the current you are using the debug SHA-1 that is why the error throwing.
To display the SHA-1 fingerprint for your certificate, first ensure that you are using the right certificate. You may have two certificates:
Debug certificate: The Android SDK tools generate this certificate automatically when you do a "debug" build from the command line, or when you build and run a project from Eclipse without exporting it as a released application. Only use this certificate with apps that you're testing; do not attempt to publish an app that's signed with a debug certificate. The debug certificate is described in more detail in the section Signing in Debug Mode in the Android Developer Documentation.
Release certificate: The Android SDK tools generate this certificate when you do a "release" build with either ant program or Eclipse. You can also generate this certificate using the keytool program. Use this certificate when you are ready to release your app to the world.
Read More..

Me too faced the same problem during releasing my app to google Play, when I used Google Maps V2 in my app. After succeeding the issue, I wrote a blog post regarding this you can have a look.
As everyone requested, I would say the answer in following steps
1) Sign up your app using eclipse adt
2) Note down the SHA1 finger print which will be displayed at console of your eclipse adt
3) Again go to google console and get API_KEY for your app by using above got SHA1 fingerprint
4) Replace the old API_KEY with the new API_KEY on to manifest.xml of your app
5) Again sign up your app. Your app is ready to be published. But keep in mind that once you published your app to google market, you should be able to release updates to your app by signing .apk using the keystore which you used earlier for release.
Hope this helps ...

Related

What SHA-1 Certificate Fingerprint should I use for release build apk?

The google map on my app only works on my DEV environment and when the apk was uploaded to store. But when I install from the release apk it doesn't work.
On my google developer console I already added 3 SHA-1 Certificate
1.) Debug certificate fingerprint
2.) Release certificate fingerprint (from app signing in google console)
3.) Upload certificate
But still not working on release apk.
Are you using your Release api key for google map API ? You must have two different api keys one for debug, one for release. You have to get a build with release api key while uploading your apk on google play. You can check here also
Android Google Maps v2 - Debug key vs Release key

Update application enrolled in Google App Signing

I have an application enrolled in Google App Signing, so the signature of the delivered APK will be different from the signature of the uploaded APK. I currently have the production APK installed on my android device and I'd like to run the app from Android Studio without losing the data, so I need to use the same SHA-1 to update the application.
If I run the application from Android Studio, with the release build type, the APK is automatically signed with the keystore that I used for the upload on Google Play Console. The SHA-1 is different from the one auto generated by Google App Signing, so Android Studio asks to uninstall the existing application:
Installation did not succeed. The application could not be installed:
INSTALL_FAILED_UPDATE_INCOMPATIBLE The device already has an
application with the same package but a different signature.
This is allowed for the applications that are not enrolled in Google App Signing, because the keystore SHA-1 is always the same. Is there a solution to this?
I tried to download the Upload certificate from Google Play console and add the certificate to my current keystore file, but it didn't work:
keytool -importcert -file upload_cert.der -keystore keystore.jks
There is no way to get an APK signed with your release key other than by uploading an APK to the Play Console if you opted for Google to generate the signing key.
However, there are good other testing processes you can set up which should hopefully help you. Make sure to differentiate your iterative local tests from your release QA (i.e. shortly before the release):
In the former case (iterative local builds), you should always test with a debug key, and you can also test the upgrade flow from one version signed with the test key to another version signed with the test key.
In the latter case, shortly before you release, you should upload an APK to the Play Console to a closed track to test exactly what will be served by the Play Console, and you can do a final check of the upgrade flow on a released app.
(Note that the internal testing track will not help you test the upgrade flow from a release-signed APK since the APK signed by Play in this case is a debug key and not your release key, so make sure you use a closed track instead).
Hope that helps.

Google Sign in not working after app is published

I have google login in my app which was working completely fine before publishing my app.But after publishing i am unable to sign in due to change in SHA key. So to change this i'm following steps in Released Management->App Sigining on my play console.
I have downloaded PEPK tool but for step 2 I have command
$ java -jar pepk.jar --keystore=foo.keystore --alias=foo --output=encrypted_private_key_path
I dont know what is foo.keystore, foo and encrypted_private_key_path
can any one please help me on this?.
While working with any of the APIs related to Google Developer Console in Android, you need to configure two different SHA1 keys, i.e. one for debug and one for release. It happens most of the times that, we forget to to generate the SHA1 key for release version. I believe following link will help you to generate SHA1 keys for both the versions.
SHA1 Key for DEBUG & RELEASE ANDROID STUDIO MAC
If you are using Google Play Signing to allow Google Play to sign the release version of your app for you, then you will need to register the SHA1 key from the release version of your app with the authentication console. You can get this key following the instructions here:
https://support.google.com/googleplay/android-developer/answer/7384423?hl=en-GB
"If your app uses any API, you will usually need to register the certificate of the key Google signs your app with for authentication purposes. This is usually done through the fingerprint of the certificate.
To find the certificate of the key Google uses to re-sign your APK for delivery:
Sign in to your Play Console.
Select an app.
On the left menu, click Release management > App signing.
From this page, you can copy the most common fingerprints (MD5, SHA-1 and SHA-256) of your app signing certificate. If the API provider requires a different type of fingerprint, you can also download the original certificate in DER format and run it through the transformation tools that the API provider requires."

Sign-in with google for android not working in release apk

I have added the Google Sign in in my application and made it work by following all the steps in the official documentation.
Everything worked fine, until I generated a signed apk for publishing. The app could not sign in , the
Log.d(TAG, "handleSignInResult:" + result.isSuccess());
in SignInActivity.java's handleSignInResult() gives the value as false.
I have registered the app on the developer console and provided the SHA1 key for they debug key as well as the release key. I am unable to solve this and couldn't find anything related in the documentation either.
When you upload an apk to the play store then play store creates a new SHA1 key called "App signing certificate". You get that SHA1 and save in your console or firebase account (as you need).
New SHA1 will be found at Released Management->App Sigining on your play console.
or
when you build signed apk with your filename.jks it has different SHA than your debug apk, put these SHA which is generated by signed apk in Firebase nd update it and again download json from firebase and override existing json from your android studio.
Before publishing app you should read Google Play launch checklist
For complete release process you can go here
Finally solved it. I added the SHA1 key for my release key (the .jks file) in the Google Developers Console under the project registered.
In Android Studio, at the left side, there is an option for Build variants under the project view. There, I changed each module to release mode (it is in debug mode by default). Then created the Signed APK by usual method, and run the app. The Google Signin worked perfectly.

Publish app with google maps V2 on google play

Previously I have implemented Google maps v1 .It had publishing key and debug separately .But now i have implemented Google maps v2 with the help of this tutorial.In it they haven't mentioned any publishing key .Do we need publishing key to publish app on google play
You need a release key for publishing you app to the Google Play Store.
A tutorial can be found here.
Note that you need the SHA-1 fingerprint of your certificate as stated in the given link:
Release certificate: The Android SDK tools generate this certificate
when you do a "release" build with either ant program or Eclipse. You
can also generate this certificate using the keytool program. This
certificate can be used with an app you release to the world. Once you
have the correct certificate for your needs, you can display its SHA-1
fingerprint using the keytool program.

Categories

Resources