Android: Blank page when using google map api 2

后端 未结 5 1886
闹比i
闹比i 2021-01-26 04:10

I\'m using google map v2 in my app but I get the blank page like this:

I did these stepe for adding this feature to my project.

  1. First of all I

相关标签:
5条回答
  • 2021-01-26 04:26

    If you changed API key in manifest just

    • clear data (in android device)

    or

    • uninstall app and reinstall it
    0 讨论(0)
  • 2021-01-26 04:32

    Try to add this permission to to your manifest

    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    
    0 讨论(0)
  • 2021-01-26 04:35

    From the Manifest file you posted it looks like you package name: package="com.com.my_package_name"

    does not match the package name you used for Google Maps permissions:

    <permission
        android:name="com.my_package_name.permission.MAPS_RECEIVE"
        android:protectionLevel="signature"/>
    <uses-permission android:name="com.my_package_name.permission.MAPS_RECEIVE/>
    

    You can see that com.com.my_package_name is different from com.my_package_name, this must be your problem.

    0 讨论(0)
  • 2021-01-26 04:44

    There are two keys debug and release key. If you signed your apk you want to use release key. I think you used debug key. So only map looks blank. Release key procedures are here.

    How to get production key for google map?

    0 讨论(0)
  • 2021-01-26 04:50

    Make sure you are using the same SHA1 finger print in API console that your project built with, find your SHA1 finger print from eclipse Window>Preferences>Android>Build>SHA1 fingerprint.

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