2
I’m using the Android maps v2 api.
I have in my Activity the following statement
<fragment
android:id="@+id/map"
android:name="com.google.android.gms.maps.MapFragment"
android:layout_width="match_parent"
android:layout_height="0dp" android:layout_weight="1"/>
And the following code to retrieve the Map:
GoogleMap mMap = ((MapFragment) getSupportFragmentManager().findFragmentById(
R.id.map)).getMap();
This code shows the following error:
Error:(150, 79) java: inconvertible types
required: com.google.android.gms.maps.MapFragment
found: android.support.v4.app.Fragment
How do I use version 2 of the android maps when using the compatibility API?