Google maps api v2 key error - android

I recently changed my hard drive to my Pc and when I clone my project from github and add the google-play-services as a library I tried to open the google maps and I didn't get any error but nothing shown up. I can see only the zoom buttons and the my location icon. Do I have to regenerate the google-map-api-key for the new ssd?

Yes you need to get your currently generated key from debug.keystore folder and register it via the Google API Console, here is a blog post I wrote on how to do just that:
Generating Google Map API V2 key

Probably you'll have to regenerate your maps API key, as I gues you have a new certificate on your new hard drive. Use keytool to do that, like here:
https://developers.google.com/maps/documentation/android/start#the_google_maps_api_key

Related

Google map app created by android studio loads no map

Need help , tired of following the tutorials but still no results. I am using android studio and trying to make map app. Tried using the map template in studio as it is just by entering my key bt no matter what i do , i get the same results, blank screen with google log. Google maps console shows zero request from my key to accces maps.
you must add api key, for this need register your application in the Google Developers Console
https://developers.google.com/maps/documentation/android/start
For starters, you need to create a project on Google Devlopers Console.
See this tutorial.
Thank you devs for support but I solved my problem myself by digging whole day , after implementing maps layout activity and manifest and other required files , the app should be build with the keystore provided in android sdk itself instead of our own keystore. keystore path - C/user/{username}/.android/debug.keystore with alias as "androiddebugkey" and password as "android".

Google maps API MapView only shows grid

I'm trying the HelloGoogleMaps project from this official google tutorial, and I get the applicaiton running just fine, 'cept the map isn't showing; instead you can see a grid without any data. Doing some research I found that the API key could be malfunctioning; I must have done something wrong. But I dont know what it could be, as I followed the instructions given in the Google Developers Console. Here's what I did to get the key:
I clicked on Create New Key
I clicked on Android Key
I discovered the SHA1 fingerprint of my developer certificate using the following command:
keytool -list -v -keystore C:\Users\Viktor.android\debug.keystore
I copied the SHA1 certificate and pasted it as the example shows:
45:B5:E4:6F:36:AD:0A:98:94:B4:02:66:2B:12:17:F2:56:26:A0:E0;com.example
I got the key and placed it in res/layout/main.xml
I did make a OAuth 2.0 Client just in case, and also activated the following APIs in Google Developer's console:
Google Maps Android API v2, Google Maps Coordinate API, Google Maps Geolocation API, Google Maps JavaScript API v3, Google Maps Tracks API.
Maybe there is some conflict? Maybe its something version related?
The minimun sdk is API 10 Android 2.3.3 Gingerbread.
The target sdk is API 21 Android 4.x (L Preview), and selected Google APIs 10 to compile it.
There is a mess with the versioning, and all tutorials and solutions I find are not updated, even google tutorials refer to old versions. Anyone can point me in the right direction?
SOLUTION
Emulators won't work, as they dont have a GPS or anything, so the best thing is to use a real android device. I tried the answer below, with the genymotion thing and got no result.
Inbuilt google Emulator will not support google map. Try installing Genymotion emulator and try again.
Also API v1 is deprecated. Try going over the steps mentioned in google site for api v2 https://developers.google.com/maps/documentation/android/start#getting_the_google_maps_android_api_v2

google map API not displayed when export APK

Hi I have a problem with Google Map API V2 does not appear when I export my project .apk.
In fact when I do my test sending my Eclipse project via USB everything works, the map is displayed. If I export the project .apk to send to a friend via Gmail and Google Map API V2 is not displayed.
I think this is a problem when exporting but I can not solve it.
If you have answers thank you in advance.
When exporting your app, in the final step the adt(eclipse) shows you the SHA1 key that would be used. Use that SHA1 key value for generating a new google maps api key. Worked for me.

convert my application into .apk file it will not show google map

Hi i am new to android application development. I did a google map v2 to show my current location using GPS.
It will work fine when i testing with mobile using USB cable
but the issue is when i convert my application into .apk it will retrive my gps current >location but did not show the map
Can anyone help to resolve my problem?
for generation .APK you must have to use keystore & MAP API KEY from same machine. if this two are diffrent from diffrent machine then it 'll heppend.. (mean MAP are not show)
if you have diffrent keystore then you can get MAP API Key from Keystore.
check below links:
How can I get the MD5 fingerprint from Java's keytool, not only SHA-1?
https://stackoverflow.com/a/5262845/1168654
Edited
open this link: follow steps on "Getting the MD5 Fingerprint of the SDK Debug Certificate" then sign up from this link : after that use that map key in you code see what heppend.
This suggests that either you do not have the Google Play Services referenced in the project properly or your device doesn't support it.
Please read the Quick Start on how to properly reference the jar in your project.

google maps api key not working v2

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.

Categories

Resources