Hi I'm trying to add GoogleMap fragment into my activity
Here is my XML:
<LinearLayout
android:id="@+id/layout_map"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/list_margin"
android:visibility="visible" >
<fragment
android:id="@+id/map_frame"
class="com.google.android.gms.maps.MapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
And my LocateusActivity
onCreate method
mapFragment = (MapFragment)getFragmentManager().findFragmentById(R.id.map_frame);
Don't know what went wrong. I got this error
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.singPost/com.singPost.LocateUsActivity}: android.view.InflateException: Binary XML file line #80: Binary XML file line #80: Error inflating class fragment
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3253)
at android.app.ActivityThread.startActivityNow(ActivityThread.java:2977)
Any help is much appreciate. Thanks!
Hi I try replace MapFragment to SupportMapFragment but same error and together with this
Caused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 9452000 but found 6587000. You must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />