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 layout
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
Post a Comment