Android Google Maps release with other api key does not shows - android

I have some issue that I have been searching without solution. I had have an app with Google Maps working well, but I deleted the project on console.developers.google.com by mistake, then the app stops to show the map.
I created another project on the console, I generated other api key with Google Maps for Android enabled. Then I changed my google_maps_api.xml value, I cleaned the project, then re-build and created a signed apk, but when install the app the maps not shows it.
I already tried this:
Change to "None restriction" for the key and wait for 24 hours.
I changed the XML attribute to templateMergeStrategy="replace".
Shutdown and turn on my smartphone.
Uninstall and install again my app.
Nothings works

You just declare your google map API key in the debug mode. There is one more google_map_api.xml file in the release folder. It should be like this, just copy/paste your api key.
P/s: Don't forget to switch your Build Variants to release before build signed apk

Related

Why Google Maps v2 are Blank on Android emulator?

I am creating a new Maps Activity using Android Studio and following all steps, with adding an API_KEY, to manifest, enabling Android Maps API in Google console, and restricting it to my package and SHA1. I have searched all internet and tried many things, but the Map is still blank.
Can anyone help?
Blank screen means you have problem about Google Maps API signing.
Probably you have created a new keystore file and used its SHA for enabling maps API.
But while you are developing all your runs are signed with debug.keystore which is default unless you declare one.
You can use your keystore file that created by you for debug runs from signing configs in Project Settings from Android Studio.
Good luck
Emre

API keys causing issues

In my android app I am using google map and location services.So I generated API key on google developer console for my development work using SHA1 generated by making use of debug.keystore.It worked fine and google map worked perfectly. When I had to release the apk I signed apk following instructions at http://developer.android.com/tools/publishing/app-signing.html#studio.
When I tried to beta test the app, google map didn't work.Visiting the forums told me that I need to generate another google console API key using SHA1 generated by using keysotore which was created while signing the apk.I did same and replaced the key in androidmanifest.xml(So now my project on google console has two API keys,older one I used for development,and newly created one ). But when I regenerated apk and tried to run it on my personal device from android studio, map didn't work.Moreover when I replaced new key by old debug version of key in manifest file and tried to rerun app on my android device map still don't work.So now my older key is also not working while it was working fine before all these changes.
Please help me in this regard.
You should be using the same API Key for your applications but you need to add both the debug and release credentials.
So you will end up with two entries in the android applications:
99:88:77:66:55:44:33:22:11:04:76:99:C3:2A:52:71:7C:64:EC:8B;com.package.app
99:88:77:66:55:44:33:22:11:1C:CC:33:D7:74:A2:49:5D:7D:BF:C6;com.package.app
You can refer to this question for help with the process of adding credentials for each keystore.

Signed apk file my application for PlayStore, no maps

I have an application on the playstore that uses maps. Although it worked fine in debug, map doesn't appears in realease.
I did the following steps:
- activate maps v2 on google console
- get the API key
- paste the API key in my manifest
- export the apt file with eclipse tool to generate and sign
It's happen because your given SH1 fingerprint signature does not match with your app's SH1 . When you have get API Key from API console you enter the SH1;package_name_of_your_app this SH1 is not the exact SH1 for your APP. For this reason map is not showing.
This is happen for me also. If any thing need please ask me.
Edited Answer
You will get this type of thing
When exporting in Eclipse like that, you will see a SHA1 signature for the release app. Use that one to create a new key, and add it instead. Then continue, as usual. The problem is that you have to have different keys for release and debug. Not sure where exactly was this written, but this should be enough as a source I think.

Maps V2 key issue

My com.me.ProjectA is a working app that uses Google Maps V2. I have both Release and Dubug api keys for this app that I got at the Google API console. The app works perfectly.
I copied projectA renaming it to com.me.ProjectB. I tested ProjectB on my device and everything ran fine except, as expected, the map would not show because I still had the api keys for the old namespace of ProjectA in the manifest file.
So, I went to the Google API console and got a new debug api key for com.me.ProjectB using my SHA1 debug fingerprint (That I can get in Eclipse by hitting Windows->Prefs->Android-> build) and my com.me.ProjectB namespace and put this into my manifest file.
So, I think I am doing everything right but when I run it on the device I get no map and I get the messages in logcat saying...
12-14 16:32:34.389: E/Google Maps Android API(30070): Authorization failure. Please see https://developers.google.com/maps/documentation/android/start for how to correctly set up the map.
12-14 16:32:34.399: E/Google Maps Android API(30070): Ensure that the following correspond to what is in the API Console: Package Name: com.me.ProjectB, API Key: AIzaSyAk1dcariCofa7b4pboMGVtReWaDwT_yL4, Certificate Fingerprint: 5A608D32E8A0901CCCD2C519010AD73BE5F609A2 (these are not the real values)
And, of course, the namespace, SHA1 fingerprint, and the API key all match.
Did I forget to do something?
Thanks,
Gary
Have you tried to completely remove the application and then install it all over again. As you said you tried to run the project with the key from Project A. This key might be got cached and even if you install the application with the new key, the old one will be used.
So before you install your application with the new key, try to remove the application completely from the phone.
You can as well go over this blog post I wrote and make sure you do all the steps right in producing the key:
Google Maps API V2 Key

Google maps v2 android api key working only with debug key

I have a problem with Google Maps api v2 on my android app.
I have generated the key for the debug certificate and everything works fine, but I can't make it work with the release certificate.
I've generated the key and the alias with eclipse, then I took the SHA1 which eclipse shows at the end of the "Export signed application" process.
Then I generated the api key for android apps in my google api console using
SHA1;package name
But it doesn't work... it works only with the debug key generated in the same way, only using the sha1 of the debug certificate!
Please help me, otherwise I can't release my app
Check your manifest file, I guess you've forgotten to set your release map api key there while exporting with your release key?
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 ...
There are two files google maps api.xml, one is the debug and release the other, then you should replace the key generated on google website console and enter this file, another outlet is inserted directly into the manifest.

Categories

Resources