0

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

predactor
  • 772
  • 4
  • 11
  • 29

2 Answers2

2

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.

Ravi Bhandari
  • 4,682
  • 8
  • 40
  • 68
  • G:\Andy\mapsss\AndroidManifest.xml:10: error: Error: No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version') – predactor Feb 25 '15 at 04:47
  • have ypu added google play service lib in your project as a support library? – Ravi Bhandari Feb 25 '15 at 04:54
  • yes i followed that links http://www.codeproject.com/Articles/614946/Android-google-map-api-v-setup?msg=4786519#xx4786519xx http://umut.thttps://developers.google.com/maps/documentation/android/start#get_an_android_certificate_and_the_google_maps_api_keyekguc.info/en/content/google-android-map-v2-step-step – predactor Feb 25 '15 at 05:01
  • While importing have you 'check' copy project in workspace 'checkbox'. Please verify your project and library project are in same directory. – Ravi Bhandari Feb 25 '15 at 05:05
  • i did it and it is added in package explorer – predactor Feb 25 '15 at 05:08
  • then open manifest of library project and copy version code and paste it to your manifest at the place of @integer/google_play_services_version it will work – Ravi Bhandari Feb 25 '15 at 05:10
  • why it not load any map ?? – predactor Feb 25 '15 at 05:26
  • have you generate api key correctly and activate google map api v2 service to google app console. – Ravi Bhandari Feb 25 '15 at 05:28
  • i think you have not activate map api service. – Ravi Bhandari Feb 25 '15 at 05:30
  • i activate Google Maps Android API v2 in services and generate code – predactor Feb 25 '15 at 05:35
2

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.

Community
  • 1
  • 1
Setu Kumar Basak
  • 11,460
  • 9
  • 53
  • 85
  • Just adding #4 worked for me, thanks. I don't know why at this stage, but most tutorials I've followed don't include that line. – Martyn Oct 14 '15 at 14:04