I am trying to display google maps on my app using Android Studio but even when I run just the default project of google maps it doesn't want to show the map. I have an API key and the necessary dependencies. I have inserted the meta-data into the manifest, but I still can't get a map on my app.
Any help please?
1- In Android Studio project, you have to insert:
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="API_KEY GOES HERE"/>
2- In your Google Developer Console project you have to add certificate fingerprint and your application id.
Example:
BB:0D:AC:74:D3:21:E1:43:67:71:9B:62:91:AF:A1:66:6E:44:5D:75;com.example.android.mapexample
Explained in details in the following Google guide (Expand this part: Displaying the release certificate fingerprint):
Getting Started | Google Maps Android API | Google Developers
Related
I'm trying to use Google Maps API on my application. All configurations on the app and Console Developer was made. Including creating project, keys...
But this error bellow still persisting on Android Studio Log Cat:
[Ensure that the "Google Maps Android API v2" is enabled.]
[Ensure that the following Android Key exists]
Searching on the console's developer, I have identified that the actually enabled API is 1. However, I can not find the option to install the 2.
I'm building Android application which using TMapView component.
I inspiring by this article Working with TMapView ...
I do this steps:
Collect API key in Google Developer console
Allow Map service Entitlement List
Put API Key on field in version info card
Allow Access network state
But in my application shown only blank map (gray square with google logo and +- zoom buttons)
MapView.MapType I tried Normall,Terrain, ... but it is same
Where can be a problem ?
You need to configure at Google Developer Console your Debug and Release certificate fingerprint.
This article teaches you to get and configure the fingerprints: Configuring Android Applications to Use Google Maps
You can see at the image that I have some fingerprints configured, that's because we have more than one developer that compiles the project.
Fixed now.
I have bad package name for debug certificate. I use com.embarcadero.MyAppName but correct package name is same as in Realse but there is different SHA-1 key
I have the same problem , i have solved it ..
I find that my APP's build setting is wrong,
when i change :
Target Platforms (Android)->Android - Android SDK 24.x.x.x 32bit ->Configuration->Development
To: XXXXXX->Configuration->"Application Store", then google map is OK..
of course, Provisioning of my project options ,Build Type: Android - Application Store , KeyStore File is the keystore i had created.
I'm dealing with an strange issue. I've followed multiple threads from forums here and nothing helped.
We are developing an Android application where we use Google Maps API v2. We are using Android Studio.
My collegue has registered our project on Google Developers Console, activated Google Maps API for the project and created new public key for the application. Then he registered that key in our AndroidManifest.xml file:
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="OUR_KEY_VALUE" />
and it works perfectly fine for him when he debugs the application in Android Studio on his mobile.
The problem is that I have the same source code as he has and when I debug or run our app on my mobile phone, the map we are using is blank and is not showing the map.
Interesting thing is that if my collegue send me the app-debug.apk file generated during Android Studio's build and I install it everything work ok and the map is there. Also when this .apk file is installed on different phones it works fine.
When I generate the app-debug.apk file using Android Studio and try to install it on my phone, map is not showing.
We even created the release key for our app and it works exactly the same.
What could be the cause that we both cannot debug the application working with the same API's key?
Thanks for your help!
You must register all keys of all of your team members. Google API Console allows to put many packages/keys per Google Maps Key. Just ask all members for their debug certificate and add new entry <PRINT>:<PACKAGE ID> per each developer. It's not true that all devs must share debug certificate. This is wrong! You need just to register each of your devs with the Google API console. That way you can easily disable developer access if i.e. he leave the company.
For future users:
The debug/release keystore used to generate Google API Key must be the same when you debug/run your app.
I have a problem when show the map into my Android App.
When I authorised the credentials into Google Console the fingerprint are different
This is the Log when execute my App.
2021-2418/eureka.seguro E/Google Maps Android API﹕ Authorization failure. Please see https://developers.google.com/maps/documentation/android/start for how to correctly set up the map.
03-01 15:46:13.057 2021-2418/eureka.seguro E/Google Maps Android API﹕ In the Google Developer Console (https://console.developers.google.com)
Ensure that the "Google Maps Android API v2" is enabled.
Ensure that the following Android Key exists:
API Key: AIzaSyBr9prMCijg7eEVKl2QC7CzFd6ATmhs0SY
Android Application (<cert_fingerprint>;<package_name>): 53:1B:06:C8:DC:3E:1D:B6:A5:FD:1B:8E:FF:B2:55:78:B9:AB:DD:64;eureka.seguro
The cert_fingerprint not mach with Google Console.
Why the app take a different finger_print? Could change?
Thanks.
2017 Update
I had a similar issue. If you have this problem make sure you review the response from the console. In my case the issue was with the manifest. The Google console doesn't have the v2 anymore as an option except for legacy projects. So in the manifest:
Change:
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="#string/google_maps_key"/>
To:
<meta-data android:name="com.google.android.geo.API_KEY" android:value="#string/google_maps_key"/>
The Authorization failure message means that the key in your API console and the key declared in your project are not the same.
First check this. If they are the same, try generating another key and do it again. This happens sometimes for no apparent cause.
I'm new to using github, but I am somewhat positive I have it configured in eclipse properly.
I'm also new to using the Google Maps API. However, the other people working on the project already have it configured with the API key and it works for them.
In my case, however:
The project successfully imports. When I run the app on my nexus 7 through eclipse, the app runs.
When the google maps api is called, the map opens but it without any map data (blank).
The console is showing a Google Authentication error.
Do I have to use my own API key?
Thanks
Assuming the API key is hardcoded in the AndroidManifest.xml in the project: ask one of the others developers to give you debug keystore from their ~/.android/ (C:\Users\somename\.android\ on Windows) folder and put it in the same location on your machine.