Question

i am currently working with googlemap v2. the problem is that i can't use the class "googlemap" it shows an error. i am using google api 4.2. how can i use this class. xml file code is given below

 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >

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

 </RelativeLayout> 

No correct solution

OTHER TIPS

If you use

class="com.google.android.gms.maps.SupportMapFragment"

Then you have to use the SupportMapFragment class in your activities. Example:

SupportMapFragment mapa;
mapa = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);

Hope it helps

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top