Google map not showing in android activity?

前端 未结 8 1035
生来不讨喜
生来不讨喜 2020-12-19 19:40

In my android app I want to have a MainActivity with a google map occupying the entire screen.

My problem is that the google map does not display a map, only the go

相关标签:
8条回答
  • 2020-12-19 20:18

    You need to enable google map api from google console for your project. And also you need to download json file from the console.

    1. Go to google console

    2. click on your project.

    3. Click on library section from left menu panel. see below image

    1. In google maps api, click on Google maps android api

    2. Than enable that.

    3. Now Goto firebase console

    4. Click on your project and goto project settings and download the json file.

    5. Add that json file in your application.

    0 讨论(0)
  • 2020-12-19 20:18

    Add this permissions to menifest

    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.INTERNET" />
    

    OR Check in google console is API ENABLED

    OR Check your google_api_key

    0 讨论(0)
提交回复
热议问题