Google maps android API v2 crashes instantly when opened -


i trying use google maps api v2 android , followed these instructions

https://developers.google.com/maps/documentation/android/start

and works fine until put code layout file

<fragment     android:id="@+id/map"     android:layout_width="match_parent"     android:layout_height="match_parent"     class="com.google.android.gms.maps.mapfragment" /> 

once code put in app crashes when opened, picture appears on graphical layoutenter image description here

thanks in advance!

use support mapfragment

<fragment                android:id="@+id/map"           android:layout_width="match_parent"           android:layout_height="match_parent"           android:name="com.google.android.gms.maps.supportmapfragment"           /> 

googlemap gm;

  gm = ((supportmapfragment(getsupportfragmentmanager().findfragmentbyid(r.id.map))).getmap();       gm.setmaptype(googlemap.map_type_normal); 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -