Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Google maps api key issue

Hi, I have added Android restrictions for my API key from then onwards I am unable to search for places from Google Maps. When I removed the restriction again search will come. My app is developed using Flutter. Can anyone please help me with what I need to do? And I already enabled the required API's

0 1 253
1 REPLY 1

Hi @mbhaskarreddy,  

Welcome to Google Cloud Community!

It seems like the issue you're facing is related to the Android restrictions you set for your Google Maps API key. 

Here are some tips that might help fix the problem:

  • SHA-1 Certificate Fingerprint: If you're using a debug keystore, make sure the SHA-1 fingerprint is correctly set in the Google Cloud Console. You can get the SHA-1 by running the following command in your terminal:
    keytool -list -v \
    -alias <your-key-name> -keystore <path-to-production-keystore>
  • Enable Necessary APIs: Apply the recommended application and API restrictions.
  • Check Android Manifest: From this sample codelabs, verify that you have added the metadata containing your API key in your AndroidManifest.xml.
  • Error Messages: You can check the logs in Google Maps metrics page for details on traffic errors and latency.
  • Regenerate the API Key: Consider regenerating your API key and reapplying the restrictions. Make sure to check this documentation before doing so.

I hope this helps.