Error in getting Google Maps in android

前端 未结 2 639
终归单人心
终归单人心 2021-01-22 02:47

I am Developing an Andorid Applicaiton which require Google Maps to The application.

For That I am Using the same Example in Following Link.

Link For Google Maps

相关标签:
2条回答
  • 2021-01-22 02:50

    Your logcat clearly said

    Caused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 4323000 but found 0. You must have the following declaration within the element:

    Try to add Google play services version using <meta-data> tag under <application> tag in your manifest.xml file like

    <meta-data
     android:name="com.google.android.gms.version"
     android:value="@integer/google_play_services_version" />
    

    Make your manifest.xml like

    ....<application>
     ..............
    <meta-data
     android:name="com.google.android.maps.v2.API_KEY"
    android:value="Key" />
    
     <meta-data android:name="com.google.android.gms.version"  
     android:value="@integer/google_play_services_version" />
    
    </application>
    
    0 讨论(0)
  • 2021-01-22 02:51

    Issue:

    Caused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 4323000 but found 0. You must have the following declaration within the element:

    Solution:

    Include Google play services version inside your manifest file.

    <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />
    

    You can read about referencing Google play services.

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