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.
Related
We have implemented Google Maps API V2 and it works fine in development. When the APK is signed and published in Google Play the maps doesn't appears.It loads with a blank White screen with MyLocation button and Zooming controls button.
How to make display the maps on the play store version.
And also,we have generated the Key with keystore file
And also iahd checked with is stackoverflow question:Google map not loading on normal devices but loads on test device(real device)
Still now the same problem exists for us
Thanks in advance for the help
When you test your application during development, you obviously used you Eclipse/Android-Studio debug key. This means that the IDE (Eclipse or Android Studio or w/e) sign your application automatically to save you the trouble, in order to test it fast. They key used for this signing is different than the one for publishing applications on Google Play.
So, you need to follow the instructions here: https://developers.google.com/maps/documentation/android/start
Following the guide, you should be able to generate a "release" key to use with your published application (instead of the debug key that you have been using until now).
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.
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.
I had an android application that utilizes google maps.
I have followed the instuctions and made the app working in debug mode using the debug key.
I have retrieved my SHA-1 key from the debug.keystore found here.
c:\Users\myself\.android\debug.keystore
using
c:\Program Files\Java\jdk1.7.0_03\bin>keytool -list -v -keystore c:\debug.keystore
The map was showing fine whenever I used tethered debug by running the app from eclipse on my test phone (which ran android 2.3.6).
However, after finishing the app, in the published app the map did not show. What was visible were only grey tiles.
I know this is an issue with the API key.
So I created a new key, (and an apk with it) used it to generate a new API key from the google's console. I deleted the apk that was generated with the key, as it had the old ApiKey, and pasted the new api key here.
<com.google.android.maps.MapView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:id="#+id/mymap"
android:apiKey="my_api_key"
Then I re exported my project but this time used the same key that I had created the step before as they contained the same SHA-1.
However, still the map does not show and only grey tiles appear.
I have entered my SHA-1 key in the api console in the following way.
18:3E:1D:8C:xx:xx:xx:xx:xx:xx:xx:xx:xx:x:xx:1D:E1:08:32:8E;com.mycompany.mapapp
I tried to revert back to my debug key, but this time the debug app (running from eclipse) also did not show any maps.
my questions are the following.
Is this still the correct method to use? Because in the --https://developers.google.com/maps/documentation/android/start#obtaining_an_api_key -- google used different approach using fragments.
What am I missing ?
Is this method deprecated or should work ?
You're generating an ApiKey for the Google Maps V2, but you are using the v1 MapView com.google.android.maps.MapView.
On the Android Maps V2 API, the key is placed on the manifest, and you use com.google.android.gms.maps.MapView to show the map, using the Google Play Services Library.
I suggest reading the overview section here to learn how to setup your Project with the Google Play Services Library, and looking at the new API Reference here.
If you are developing google maps api. You need to have two sets of map api key. One map api key that is generated by using your SHA1 fingerprint from your debugging keystore, this map api key is to be used when you are debugging your app in eclipse and running it from there. The other map api key is generated by using your SHA1 fingerprint from official or production keystore, this map api key is used when you will signed or publish your app.
I think you are experiencing mismatch of your keys there since the map api key on the manifest is from debugging keystore and you have signed your app with your official keystore.
Also I think you are developing MapView. It is recommended now to use MapFragments now. I have links here that might help you.
Quick Start Guide: https://docs.google.com/document/d/1dFzZT0C782BxLkDIUEb711rmsbMmYPURFV_2Cdb36so/edit?usp=sharing
Trouble shooting thread if you encounter problems with MapFragment or Google Play Services Library:
Unable instantiate android.gms.maps.MapFragment
Also I have answers here in this How to/Error in declaring google-play-services-component that might help you.
i have made an android application and in it , there is one scenario when the user clicks on an address and that address shows up on google maps.
Now when i tested the application on the emulator, the google maps did load properly, but now that i am trying the same on my htc desire z, the maps is not loading.
Although the maps application which came built-in in my phone is loading google maps correctly.
what could be the problem? why is my application not able to load the map view?
thank you in advance.
EDIT: i have obtained a google map api key and have included it in the mapview that i am using.i have added overlays and etc. It is all showing fine on the emulator , but on my device it is not showing any maps. The overlays are visible.
There is a difference between a debug maps API key and a release maps API key. With the first it will only run on the emulator.
Unless you have visited the Google site twice (once to get a key which matches the debug keystore and once to get a key which matches your release keystore) then you haven't got a release key and your app won't run on real device.
Our Android developers were also facing this problem. We solved the problem like this:
We generated API keys from each machine and added the Key to their respective main.xml file. So each developer had a separate api key.
We started the emulator from the command line using the android "emulator" command which is located in the tools directory and started with the proxy option instead of starting it from eclipse, eg :
E:>emulator -avd New_Device -http-proxy http://202.0.0.203:808
Most probably, you didn't register your application into the system. This is the link.
http://code.google.com/android/add-ons/google-apis/maps-api-signup.html
If this is not the case, please provide the error details from Logcat.
You need to get an API key from Google.
Here is a good article that explain how to obtain API key.