Android Map v2 Program Crashes at start

前端 未结 3 778
难免孤独
难免孤独 2021-01-24 23:58

I\'ve searched for a week and tested all the solutions said, but nonestrong text worked! I\'ve tried every thing said in:

Google Maps Android API v2 - Getting Started

相关标签:
3条回答
  • 2021-01-25 00:24

    Add this permission to AndroidManifest.xml

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

    The log-cat was clear to you, it identified the problem as:

    Caused by: java.lang.SecurityException: The Maps API requires the additional following permissions to be set in the AndroidManifest.xml to ensure a correct behavior: <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    
    0 讨论(0)
  • 2021-01-25 00:25

    You should go the the SDK Manager and download the last google-play-services sdk from there:

    enter image description here

    Then copy it to your project from the:

    SDK/extras/google/google_play_service to your project and reference this one.

    This should be the correct google play service version.

    0 讨论(0)
  • 2021-01-25 00:31

    Have you turned on the Google Android Map v2 on the API console ?
    When you import your project you need to check the box "Copy projects into workspace"

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