I have used maps before in a small app and it was working fine and i wanted to use it again in another #android app using google API 2.1 update api level 7 emulator. The problem is that getFromLocationName() function is not working. The returned size of list is zero. After many hours, I used my friend's computer registered MAP API key. Then getFromLocationName is working but showing no tiles. I gave code to him and asked him to use his API key and same emulator and IT WORKED. I have checked my md5 has key again and checked generated key also. I tried to reopen previous working app and it is also not working now. I have also tried to use new emulator nothing works. Damn frustrated please help..
Have you tried signing the application with a release key (and corresponding api key ofc), and then validate it on the emulator?
It can give a good indication whether or not there's something wrong with your debug keystore.
Related
Okay, so here is my problem:
I made a little app for myself that uses the Maps API from Google. I followed the instructions on how to put the API key in the app and all that. I make my app, run it on my phone (via USB debugging if that's important) and it works just fine. Now, out of fun, I put the app on Google Play Store (for some of my friends and family to use it idk), and all of a sudden, the app doesn't work. What happened was, the map wouldn't load (as if i haven't put in the API key). Then I uninstalled the app, tried running it with USB debugging again, and the same thing happened. So I put in the new API key, and it works just fine. Uploaded the version 2 in the Play Store, same problem and the same situation. How do I fix this?
I will provide any additional information that you need.
Check if you've entered your API key within the google_maps_api.xml file in the release directory (/app/src/release/res/values) just like in your debug directory (/app/src/main/debug/values).
Then, if you have API key restrictions make sure that you are using right certificates for the debug and release builds. You can get your debug and release certificates by following the steps given on Google Maps SDK for Android documentation
I hope this helps! Goodluck on your project
I know this question was already ask 100, 1000-times, but still I have a problem with it and I already tried a lot by signing the application and to visualize the map after putting them in the store.
What I actually want is the following: Putting the android application in the store under "Alpha" version. This works without a problem, the application works, the only thing that doesn't work is the google map, its a white screen, I think the problem is that there is something wrong with the signed api key, but I don't know what.
Firstly I did the keystore with this dialog.
Afterwards I generate the SHA1 value for the google map api key with this new keystore. Putting the SHA1 value into the console.developers.google.com link under credentials to generate a PUBLIC API ACCESS key under the following format: XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX;PPP.PPPPP and then I generate a key and copied this in the manifest file.
And finally I either generated a signed apk for the store or directly signed it by building it for the smartphone.
But still it doesn't work. I don't know what the problem could be... Maybe one of you can help me.
OK guys thanks for your help I found the error... Don't know how it came to this error but still I found it.
As you may know android studio will generate you an google_maps_api.xml file. When I opened the file there was the key written "ALZ...." but when I check in the multi languages place, there was written "YOUR_KEY_HERE", so something went wrong... After putting the key in the multi language place it worked :)
I had a similar problem (since the key generation was device specific). I don't know whether its the best answer or not but following solved my problem:In Google Developer Console(after creating project and enabling apis), I generated a browser key without entering any ip and used that as my key.That solved my issue.
I'm doing a project with two colleagues using Android Studio, where we need to use google maps, however this problem has appeared everytime. When I compile and have the app running on my pc Android Studio everything works great and google maps works however when I send the project to either one of my colleagues when they try and run the app on their phones Google Maps only shows a grey screen, showing only the buttons but not the maps. We share the same keys generated by myself. The minSdkVersion implemented on the project covers all our phones. We have tried several things and none of them seemed to solve problem, like generating different keys for each one of them.
The only thing that seems to work is if I run the app using their phones through my computer, it's the only way that the app will show the maps.
Any help would be appreciated
The API key you've generated does not match their keystore. This key is generated with the SHA1 of your keystore. Make sure you all have the same keystore. Each install of Android Studio creates a new debug-keystore. You should make sure you use the same keystore.
I am new to android. I worked on a different machine to develop my app. Now I moved everything to new machine. Everything works fine except the google maps. I see following errors in LogCat.
Failed to load map. Error contacting Google servers. This is probably an authentication issue
Please help me in resolving this.
Thanks
You need to generate a New API Key because you change the system so that your SHA-1 also gonna be changed. So, generate a New key and try..
Try to generate new key. The key is system specific. Once the app is published you don't need to do this in every system though.
System specific: This is because of the key you generated using terminal
I hope that I can be clear; I know there are a lot of threads on the Google Map API, but I have exhausted my brain trying to fix my problem with the maps. Please tell me what I have wrong here.
I understand there are two Google Map API keys.
1) API key, for a market published app. Maps will appear once the app is published.
2) Debug API key, only works on emulator or side loaded to the phone for testing.
My partner and I are working on an app together from different PC’s. We each have our own debug api key.
1) He sends his app folder from his .android folder
2) I drop the files into folder in my .android folder
3) I import the project into eclipse
4) Replace his API key with mine.
5) Run application
He gets maps displaying on his application, but I do not. I get the gray grid.
Do I need to build a new APK of the app before the maps will appear? Does this new APK have to be created exactly like he did his?
Does the path to my APK need to be in the same folder as my keytool.debug?
How does the fingerprint relate to the APK?
Please clarify, we are stumped.
The maps API key is linked to the keystore which was used to register. You will need the debug.keystore that was used to register for the API key. Here are some quick instructions I found on how to do this.
Sharing one keystore is much easier than changing the reference to a new maps API key every time you make a revision. I'm not sure why your method isn't working though.