google maps V2 “Unfortunately app has Stopped”

2019-02-20 23:39发布

I just begin to learn Android .take 4 days to try work maps view but not work .that error Unfortunately the app has stopped manifest

manifest

mainActivty.java

activity

2条回答
\"骚年 ilove
2楼-- · 2019-02-20 23:59

For google map to work add below lines to your manifest -

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

and import google play service library to your workspace.

查看更多
一夜七次
3楼-- · 2019-02-21 00:21

There are some things you need to check:

1. Is the SHA1 fingerprint is ok that you have registered in google api console.For how to find it , you can find it here

2. The generated api_key must be same with the menifest.

3. Name of the app in api console must be same with the name of app in strings.xml.

4. meta-data must have to be included in menifest.

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


I recommend you to follow this link.It is awesome and it will take just 1 hour for you to map working.

查看更多
登录 后发表回答