Google Map not working in Released apk - android

I am creating an android app using Google Maps Api v2 targeted for Android Api 16+ compiled using Api 23.
I am having a strange problem. When I tested the app on my phone; installing through Studio's Run button, It work perfectly fine, but when I released an APK and installed the app from the APK on my phone, map does not work. Only a dark grey color loads in the map fragment. I am using the default template provided by the AndroidStudio to create the Map. Please, let me know if you require more details to answer my question.
Thanks in advance,
Abhishek

I solved the problem by moving the API key from separate resources file generated by Studio to Manifest file.
Thank you #Florence Herrou for your answer.

Related

Why Google maps stopped working?

I have done an application for android , and I used Android Studio , in this app I need to use Google maps, so while I was working i did all that stuff about the API key to use google maps, i was proving my app on my own movile, and there everything works fine, even googlemaps, but when I put my app on the store, i downloaded it from another device, and there google maps does not work. =(
Do you have any idea why does this happen ?
There might be an issue with your API key for map. (ie. Either there is issue in defining package name or SHA key)
Try to re-generate API key with all proper info. and re-build your project.

Google's sample maps application from play services won't work

So I have been having problems getting maps to work on my project and could not figure out why it wouldn't work, so I tested out the maps test application that comes in the services add on for Android Studio but just the menu will work and it still gives me a blank screen for the map even though it shows no errors.
This is a very vague question, I know, but is there something I'm missing?
Did you get an API key for your application?
From https://developers.google.com/maps/documentation/android/intro#sample_code:
Add your own Google Maps Android API key. The package name for the demo app is com.example.mapdemo. Note that the demo app already includes an API key in its manifest file. You will need to replace the key with your own API key.

Updating Android App - Maps Problems

I need to update an Android app that was developed by someone else. Update by itself is simple, it's simple changes to XML layouts.
So I have a following plan:
update an app (done)
test it on emulator (- maps don't work) stuck here!
test it on devices
release updated version to the store.
Unfortunately I am having mulitple problems with the app.
At first, it doesn't compile because the Project Build Target API was set to Android 2.3.3.
Is there any reason why it wasn't set to Google APIs 2.3.3 ?
When I change it to Google APIs it compiles and runs but I my maps don't display correctly.
All I can see is gray rectangle and annotations on top of it. I am getting following error message associated with it.
05-11 20:45:42.554: W/System.err(598): java.io.IOException: Server returned: 3
05-11 20:45:42.559: W/System.err(598): at android_maps_conflict_avoidance.com.google.googlenav.map.BaseTileRequest.readResponseData(BaseTileRequest.java:115)
As far as I understood from searching with Google and Stack Overflow that might be related to signing up the application. Currently app is using v1 of Google Maps.
Deleting debug.keystore and key set doesn't help.
I am not sure how to proceed with it. Any help will be appreciated.
In order to make maps display you need a signing key that is associated with the API key application was using. Android API v1 is now deprecated, so your options are limited:
contact previous developer and ask them for debug.keystore, which is stored in ~/.android/ or C:/Users/user.name/.android/ directory or
use release signing key for testing (this might be cumbersome)
Depending on what application is that it might also be a good or bad idea to switch to API v2. New API still has some ugly impl bugs, but you won't notice them if maps usage is simple. The API or v2 is pretty good.

How to integrate Google map with my app in Android2.1?

I am writing an application in android 2.1. I just want to implement Google map for my app. I found this link Google Map. Its good.
But I found out, For google map I have to create a project with a Google API version. Which is Along with Android2.2. But my application is in Android2.1. So How I can integrate Google map with 2.1.
What I am thinking I have to create a new project with Google API2.2 version. Then I have to move all my code from current project to that. Am I wrong?
If I am right, Then will this run on 2.1? I it always run for 2.2 and above only?
You can select Google APIs for 2.1 also. Select Google APIS with 2.0.1 and then follow the link
as mentioned by you.
One thing is sure that for whole application you should include only one api version that can
be Google android 2.1 or google android 2.2, i have jst checked it you can use any one api of
the mentioned above two.. and you will get d same result, without changing your code.....

Android Map: Map does not show up on Device

I am able to see Map in emulator but once I load app on device map does not show up.
Emulator have target as google api 1.6 and device have android 1.6 loaded.
Is this diffrence causing issue?
please help and thanks in advance.
Are you just seeing gray tiles? In that case it's almost definitely the API key that's wrong. The Emulator uses the debug keystore, with androiddebugkey, so you should create an API key for that. Remember to change it when you publish the app to the market =)
Obtaining an API Key
While the problem is most likely the one that Mr. Hedlund suggested...if the built-in Google Maps application also does not work, it is likely to be a problem accessing the Google Maps tile server from the emulator over the Internet. You would need to discuss this with your IT department.
sorry i know its a dead topic but just wanted to add my experience with this;
u need the maps api key to be based off of the current keystore you are using
i had exported my project using a new keystore but a maps key generated from my old keystore. once i used the new keystore to generate a new maps key everything worked
I had the same problem with gray tiles, even though I had created/verified the API key, and had previously had the map working for some time. Turns out at some point, I edited the manifest file and moved the permissions lines. They apparently need to go BEFORE the application element. Thanks to Alan LaMielle (link) for that solution!

Categories

Resources