getting error with Google maps API in FLutter - android

I enabled Google maps api, and I added the api to AndroidManifest.xml and AppDelegate.swift.
And I added to AndroidManifest.xml
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="MY_API"/>
But even that when I'm trying to run the app and use Google maps, I got Error getting the google api

Related

Google Maps does not provide map after updating Android app target SDk and Gradle

I developed an application that uses Google Maps for Android to show the map and route based on a GeoJSON file. The application was working fine until I decided to change some features of the project. At first step, I changed the target SDK version from 23 to 25, Android tools from 1.2 to 3 and Gradle from 2.1 to 4. But with these small changes, the GM just shows the "Google" logo in the fragment but not the map. In AS the logcat gives me this error:
E/Google Maps Android API: Authorization failure. Please see https://developers.google.com/maps/documentation/android-api/start for how to correctly set up the map.
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: ---- I removed it intentionally ----
This is my AndroidManifest which you can see V2 is enabled.
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
For the second possible reason, I checked Google credential and API key was valid too. How can I resolve this weird issue?
I found the problem as my current API key was application restricted, I create another credential and get another API key and it works fine.

Only Google Maps Android API V1 is activated, how to activate v2 on Developer Console?

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.

Android studio doesn't show google maps

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

Google Maps Android API v2 Manifest Meta Data

I'm running an app in production making use of Google Maps Android API v2 using support library, and just glancing over reference docs from Google I noticed I'm missing the following line:
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
https://developers.google.com/maps/documentation/android/start#add_the_google_play_services_version_to_your_apps_manifest
Google documention seems to be missing explanation of this key.
How important is it to include the version in the manifest and what does it accomplish?
Thanks.
AFAIK it is needed to tell the Android framework and the playstore the version of the play services library against which you have complied your app and I guess it will be required to track if any new features (or deprecated features) are being used by you app.
You can see now some apps wont work unless we update the google play services in our device which clearly shows us that if an app compiled with a newer version of play services lib the device must have the same or above version of the play store apk in order to run the app this maybe due to security and feature dependency on the new play services(ie.. GoogleDrive API, Google+ API,Google auto API ).
This is just to tell the DVM which google play service version in using your device. if you are not specifying it then it will crash your application because didn't come to know about the version. I'm also wondering how google didn't specify this in documention. But it is necessary to specify this.
Add the Google Play services version to your app's manifest
Edit your application's AndroidManifest.xml file, and add the following declaration within the element. This embeds the version of Google
Play services that the app was compiled with.
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
An Android application that uses the Google Maps Android API should specify the following settings in its manifest file, AndroidManifest.xml:
the first one is:
• A reference to the Google Play services version. If you have followed the steps on this page up to this point, you have already added the required declaration to your application manifest.
• ... ...

How to change cert_fringerprint into Android App to use Google Maps API

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.

Categories

Resources