user2218657 user2218657 - 2 months ago 31
Android Question

Unable to Re-inflate a fragment dialog Xamarin and C#

I am having an issue with my fragment dialog. I have a listview & when I click on a single list view item, I am able to move in to the fragment dialog.

But when I go back to the parent that is holding the listview & try to re-enter into the fragment dialog I am getting this error.

Android.Views.InflateException: Binary XML file line #1: Error inflating class fragment


The line that is giving me the error is

var view = inflater.Inflate(Resource.Layout.dialog_preview_busn, container, false);


Here is the XML File

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@drawable/dialogLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:minWidth="300dp"
android:minHeight="200dp"
android:weightSum="100"
android:gravity="center">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="15"
android:id="@+id/relativeLayout2"
android:minWidth="25px"
android:minHeight="25px">
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginBottom="5dp"
android:indeterminate="true"
android:background="@drawable/progressBarDesign"
android:id="@+id/fragProgress"
android:visibility="invisible" />
</RelativeLayout>
<TextView
android:text=""
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="10"
android:gravity="center"
android:textSize="20sp"
android:id="@+id/txtName" />
<LinearLayout
android:background="@drawable/dialogLayout"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="5">
<LinearLayout
android:background="@drawable/dialogLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="100">
<TextView
android:text="Address: "
android:layout_width="0dp"
android:layout_weight="50"
android:layout_height="fill_parent"
android:gravity="right"
android:textSize="15sp"
android:id="@+id/labAddess" />
<TextView
android:text=""
android:layout_width="0dp"
android:layout_weight="50"
android:layout_height="fill_parent"
android:gravity="left"
android:textSize="15sp"
android:id="@+id/txtAddress"
android:layout_below="@id/txtName" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:background="@drawable/dialogLayout"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="5">
<LinearLayout
android:background="@drawable/dialogLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="100">
<TextView
android:text="Number: "
android:layout_width="0dp"
android:layout_weight="50"
android:layout_height="fill_parent"
android:gravity="right"
android:textSize="15sp"
android:id="@+id/labNumber" />
<TextView
android:text=""
android:layout_width="0dp"
android:layout_weight="50"
android:layout_height="fill_parent"
android:gravity="left"
android:textSize="15sp"
android:id="@+id/txtNumber"
android:layout_below="@id/txtAddress" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:background="@drawable/dialogLayout"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="5">
<LinearLayout
android:background="@drawable/dialogLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="100">
<TextView
android:text="Email: "
android:layout_width="0dp"
android:layout_weight="50"
android:layout_height="fill_parent"
android:gravity="right"
android:textSize="15sp"
android:id="@+id/labEmail" />
<TextView
android:text=""
android:layout_width="0dp"
android:layout_weight="50"
android:layout_height="fill_parent"
android:gravity="left"
android:textSize="15sp"
android:id="@+id/txtEmail"
android:layout_below="@id/txtNumber" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:background="@drawable/dialogLayout"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="5">
<LinearLayout
android:background="@drawable/dialogLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="100">
<TextView
android:text="Website: "
android:layout_width="0dp"
android:layout_weight="50"
android:layout_height="fill_parent"
android:gravity="right"
android:textSize="15sp"
android:id="@+id/labEmail" />
<TextView
android:text=""
android:layout_width="0dp"
android:layout_weight="50"
android:layout_height="fill_parent"
android:gravity="left"
android:textSize="15sp"
android:id="@+id/txtWebsite"
android:layout_below="@id/txtEmail" />
</LinearLayout>
</LinearLayout>
<TextView
android:text="Hours"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="5"
android:gravity="center"
android:textSize="15sp"
android:id="@+id/labHours"
android:layout_below="@id/txtWebsite" />
<TextView
android:text=""
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="5"
android:gravity="center"
android:textSize="15sp"
android:id="@+id/txtHours"
android:layout_below="@id/labEmail" />
<ImageView
android:layout_width="30sp"
android:layout_height="30sp"
android:paddingTop="6sp"
android:layout_gravity="center"
android:background="#4A115C"
android:src="@drawable/menu_down_arrow"
android:id="@+id/downArrow"/>
<LinearLayout
android:background="@drawable/dialogLayout"
android:id="@+id/mapLayout"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="5">
<fragment
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="200sp"
android:layout_marginLeft="10sp"
android:layout_marginRight="10sp"
android:layout_marginTop="15sp"
android:layout_marginBottom="10sp"
android:name="com.google.android.gms.maps.MapFragment" />
</LinearLayout>
</LinearLayout>


The Code block that is calling the dialog fragment. This code is located inside of a listview_ItemLongClick(object sender, AdapterView.ItemLongClickEventArgs e).

Android.App.FragmentTransaction transaction_prev = FragmentManager.BeginTransaction().AddToBackStack(null);
dialog_preview_busn previewBusn = new dialog_preview_busn(gName, gAddress, gZip, gNumber, gEmail, gWebsite, gHours, gImage);
previewBusn.Show(transaction_prev, "Dialog Preview Business");


The Full output from the debugger from when the error happens:

Unhandled Exception:

Android.Views.InflateException: Binary XML file line #1: Error inflating class fragment

09-27 13:43:22.963 D/Mono ( 2359): DllImport attempting to load: '/system/lib/liblog.so'.
09-27 13:43:22.963 D/Mono ( 2359): DllImport loaded library '/system/lib/liblog.so'.
09-27 13:43:22.963 D/Mono ( 2359): DllImport searching in: '/system/lib/liblog.so' ('/system/lib/liblog.so').
09-27 13:43:22.963 D/Mono ( 2359): Searching for '__android_log_print'.
09-27 13:43:22.963 D/Mono ( 2359): Probing '__android_log_print'.
09-27 13:43:22.963 D/Mono ( 2359): Found as '__android_log_print'.
09-27 13:43:22.983 I/MonoDroid( 2359): UNHANDLED EXCEPTION:
09-27 13:43:23.003 I/MonoDroid( 2359): Android.Views.InflateException: Binary XML file line #1: Error inflating class fragment ---> Java.Lang.IllegalArgumentException: Binary XML file line #1: Duplicate id 0x7f0a001d, tag null, or parent id 0x7f0a001c with another fragment for com.google.android.gms.maps.MapFragment
09-27 13:43:23.003 I/MonoDroid( 2359): --- End of managed Java.Lang.IllegalArgumentException stack trace ---
09-27 13:43:23.003 I/MonoDroid( 2359): java.lang.IllegalArgumentException: Binary XML file line #1: Duplicate id 0x7f0a001d, tag null, or parent id 0x7f0a001c with another fragment for com.google.android.gms.maps.MapFragment
09-27 13:43:23.003 I/MonoDroid( 2359): at android.app.Activity.onCreateView(Activity.java:4940)
09-27 13:43:23.003 I/MonoDroid( 2359): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:695)
09-27 13:43:23.003 I/MonoDroid( 2359): at android.view.LayoutInflater.rInflate(LayoutInflater.java:761)
09-27 13:43:23.003 I/MonoDroid( 2359): at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
09-27 13:43:23.003 I/MonoDroid( 2359): at android.view.LayoutInflater.inflate(LayoutInflater.java:498)
09-27 13:43:23.003 I/MonoDroid( 2359): at md5acfef63ba52ffd159bb4b4b5411a5ab5.dialog_preview_busn.n_onCreateView(Native Method)
09-27 13:43:23.003 I/MonoDroid( 2359): at md5acfef63ba52ffd159bb4b4b5411a5ab5.dialog_preview_busn.onCreateView(dialog_preview_busn.java:45)
09-27 13:43:23.003 I/MonoDroid( 2359): at android.app.Fragment.performCreateView(Fragment.java:1700)
09-27 13:43:23.013 I/MonoDroid( 2359): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:890)
09-27 13:43:23.013 I/MonoDroid( 2359): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1062)
09-27 13:43:23.013 I/MonoDroid( 2359): at android.app.BackStackRecord.run(BackStackRecord.java:684)
09-27 13:43:23.013 I/MonoDroid( 2359): at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1447)
09-27 13:43:23.013 I/MonoDroid( 2359): at android.app.FragmentManagerImpl$1.run(FragmentManager.java:443)
09-27 13:43:23.013 I/MonoDroid( 2359): at android.os.Handler.handleCallback(Handler.java:733)
09-27 13:43:23.013 I/MonoDroid( 2359): at android.os.Handler.dispatchMessage(Handler.java:95)
09-27 13:43:23.013 I/MonoDroid( 2359): at android.os.Looper.loop(Looper.java:157)
09-27 13:43:23.013 I/MonoDroid( 2359): at android.app.ActivityThread.main(ActivityThread.java:5293)
09-27 13:43:23.013 I/MonoDroid( 2359): at java.lang.reflect.Method.invokeNative(Native Method)
09-27 13:43:23.013 I/MonoDroid( 2359): at java.lang.reflect.Method.invoke(Method.java:515)
09-27 13:43:23.013 I/MonoDroid( 2359): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
09-27 13:43:23.023 I/MonoDroid( 2359): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
09-27 13:43:23.023 I/MonoDroid( 2359): at dalvik.system.NativeStart.main(Native Method)
09-27 13:43:23.023 I/MonoDroid( 2359): --- End of managed Java.Lang.IllegalArgumentException stack trace ---
09-27 13:43:23.023 I/MonoDroid( 2359): java.lang.IllegalArgumentException: Binary XML file line #1: Duplicate id 0x7f0a001d, tag null, or parent id 0x7f0a001c with another fragment for com.google.android.gms.maps.MapFragment
09-27 13:43:23.023 I/MonoDroid( 2359): at android.app.Activity.onCreateView(Activity.java:4940)
09-27 13:43:23.023 I/MonoDroid( 2359): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:695)
09-27 13:43:23.023 I/MonoDroid( 2359): at android.view.LayoutInflater.rInflate(LayoutInflater.java:761)
09-27 13:43:23.023 I/MonoDroid( 2359): at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
09-27 13:43:23.023 I/MonoDroid( 2359): at android.view.LayoutInflater.inflate(LayoutInflater.java:498)
09-27 13:43:23.023 I/MonoDroid( 2359): at md5acfef63ba52ffd159bb4b4b5411a5ab5.dialog_preview_busn.n_onCreateView(Native Method)
09-27 13:43:23.023 I/MonoDroid( 2359): at md5acfef63ba52ffd159bb4b4b5411a5ab5.dialog_preview_busn.onCreateView(dialog_preview_busn.java:45)
09-27 13:43:23.023 I/MonoDroid( 2359): at android.app.Fragment.performCreateView(Fragment.java:1700)
09-27 13:43:23.023 I/MonoDroid( 2359): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:890)
09-27 13:43:23.023 I/MonoDroid( 2359): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1062)
09-27 13:43:23.033 I/MonoDroid( 2359): at android.app.BackStackRecord.run(BackStackRecord.java:684)
09-27 13:43:23.033 I/MonoDroid( 2359): at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1447)
09-27 13:43:23.033 I/MonoDroid( 2359): at android.app.FragmentManagerImpl$1.run(FragmentManager.java:443)
09-27 13:43:23.033 I/MonoDroid( 2359): at android.os.Handler.handleCallback(Handler.java:733)
09-27 13:43:23.033 I/MonoDroid( 2359): at android.os.Handler.dispatchMessage(Handler.java:95)
09-27 13:43:23.033 I/MonoDroid( 2359): at android.os.Looper.loop(Looper.java:157)
09-27 13:43:23.033 I/MonoDroid( 2359): at android.app.ActivityThread.main(ActivityThread.java:5293)
09-27 13:43:23.033 I/MonoDroid( 2359): at java.lang.reflect.Method.invokeNative(Native Method)
09-27 13:43:23.033 I/MonoDroid( 2359): at java.lang.reflect.Method.invoke(Method.java:515)
09-27 13:43:23.033 I/MonoDroid( 2359): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
09-27 13:43:23.033 I/MonoDroid( 2359): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
09-27 13:43:23.033 I/MonoDroid( 2359): at dalvik.system.NativeStart.main(Native Method)
09-27 13:43:23.033 I/MonoDroid( 2359): --- End of inner exception stack trace ---
09-27 13:43:23.033 I/MonoDroid( 2359): at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3540/1cf254db/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
09-27 13:43:23.033 I/MonoDroid( 2359): at Java.Interop.JniEnvironment+InstanceMethods.CallObjectMethod (JniObjectReference instance, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00085] in /Users/builder/data/lanes/3540/1cf254db/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.g.cs:11283
09-27 13:43:23.033 I/MonoDroid( 2359): at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualObjectMethod (System.String encodedMember, IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00031] in /Users/builder/data/lanes/3540/1cf254db/source/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.JniInstanceMethods_Invoke.cs:350
09-27 13:43:23.043 I/MonoDroid( 2359): at Android.Views.LayoutInflater.Inflate (System.Xml.XmlReader parser, Android.Views.ViewGroup root, Boolean attachToRoot) [0x0005b] in /Users/builder/data/lanes/3540/1cf254db/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Views.LayoutInflater.cs:725
09-27 13:43:23.043 I/MonoDroid( 2359): at My_Town_App.Droid.dialog_preview_busn.OnCreateView (Android.Views.LayoutInflater inflater, Android.Views.ViewGroup container, Android.OS.Bundle savedInstanceState) [0x0000b] in C:\Users\Owner\documents\visual studio 2015\Projects\My_Town_App\My_Town_App\My_Town_App.Droid\dialog_preview_busn.cs:99
09-27 13:43:23.043 I/MonoDroid( 2359): at Android.App.Fragment.n_OnCreateView_Landroid_view_LayoutInflater_Landroid_view_ViewGroup_Landroid_os_Bundle_ (IntPtr jnienv, IntPtr native__this, IntPtr native_inflater, IntPtr native_container, IntPtr native_savedInstanceState) [0x00022] in /Users/builder/data/lanes/3540/1cf254db/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.App.Fragment.cs:1612
09-27 13:43:23.043 I/MonoDroid( 2359): at (wrapper dynamic-method) System.Object:7764fb92-ef49-4334-84ad-92014396e88a (intptr,intptr,intptr,intptr,intptr)
09-27 13:43:23.043 I/MonoDroid( 2359): --- End of managed Android.Views.InflateException stack trace ---
09-27 13:43:23.043 I/MonoDroid( 2359): android.view.InflateException: Binary XML file line #1: Error inflating class fragment
09-27 13:43:23.043 I/MonoDroid( 2359): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:719)
09-27 13:43:23.043 I/MonoDroid( 2359): at android.view.LayoutInflater.rInflate(LayoutInflater.java:761)
09-27 13:43:23.043 I/MonoDroid( 2359): at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
09-27 13:43:23.043 I/MonoDroid( 2359): at android.view.LayoutInflater.inflate(LayoutInflater.java:498)
09-27 13:43:23.043 I/MonoDroid( 2359): at md5acfef63ba52ffd159bb4b4b5411a5ab5.dialog_preview_busn.n_onCreateView(Native Method)
09-27 13:43:23.043 I/MonoDroid( 2359): at md5acfef63ba52ffd159bb4b4b5411a5ab5.dialog_preview_busn.onCreateView(dialog_preview_busn.java:45)
09-27 13:43:23.043 I/MonoDroid( 2359): at android.app.Fragment.performCreateView(Fragment.java:1700)
09-27 13:43:23.043 I/MonoDroid( 2359): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:890)
09-27 13:43:23.043 I/MonoDroid( 2359): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1062)
09-27 13:43:23.043 I/MonoDroid( 2359): at android.app.BackStackRecord.run(BackStackRecord.java:684)
09-27 13:43:23.043 I/MonoDroid( 2359): at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1447)
09-27 13:43:23.043 I/MonoDroid( 2359): at android.app.FragmentManagerImpl$1.run(FragmentManager.java:443)
09-27 13:43:23.043 I/MonoDroid( 2359): at android.os.Handler.handleCallback(Handler.java:733)
09-27 13:43:23.043 I/MonoDroid( 2359): at android.os.Handler.dispatchMessage(Handler.java:95)
09-27 13:43:23.043 I/MonoDroid( 2359): at android.os.Looper.loop(Looper.java:157)
09-27 13:43:23.043 I/MonoDroid( 2359): at android.app.ActivityThread.main(ActivityThread.java:5293)
09-27 13:43:23.043 I/MonoDroid( 2359): at java.lang.reflect.Method.invokeNative(Native Method)
09-27 13:43:23.043 I/MonoDroid( 2359): at java.lang.reflect.Method.invoke(Method.java:515)
09-27 13:43:23.043 I/MonoDroid( 2359): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
09-27 13:43:23.043 I/MonoDroid( 2359): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
09-27 13:43:23.043 I/MonoDroid( 2359): at dalvik.system.NativeStart.main(Native Method)
09-27 13:43:23.053 I/MonoDroid( 2359): Caused by: java.lang.IllegalArgumentException: Binary XML file line #1: Duplicate id 0x7f0a001d, tag null, or parent id 0x7f0a001c with another fragment for com.google.android.gms.maps.MapFragment
09-27 13:43:23.053 I/MonoDroid( 2359): at android.app.Activity.onCreateView(Activity.java:4940)
09-27 13:43:23.053 I/MonoDroid( 2359): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:695)
09-27 13:43:23.053 I/MonoDroid( 2359): ... 20 more
09-27 13:43:23.053 I/MonoDroid( 2359): --- End of managed Android.Views.InflateException stack trace ---
09-27 13:43:23.053 I/MonoDroid( 2359): android.view.InflateException: Binary XML file line #1: Error inflating class fragment
09-27 13:43:23.053 I/MonoDroid( 2359): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:719)
09-27 13:43:23.053 I/MonoDroid( 2359): at android.view.LayoutInflater.rInflate(LayoutInflater.java:761)
09-27 13:43:23.053 I/MonoDroid( 2359): at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
09-27 13:43:23.053 I/MonoDroid( 2359): at android.view.LayoutInflater.inflate(LayoutInflater.java:498)
09-27 13:43:23.053 I/MonoDroid( 2359): at md5acfef63ba52ffd159bb4b4b5411a5ab5.dialog_preview_busn.n_onCreateView(Native Method)
09-27 13:43:23.053 I/MonoDroid( 2359): at md5acfef63ba52ffd159bb4b4b5411a5ab5.dialog_preview_busn.onCreateView(dialog_preview_busn.java:45)
09-27 13:43:23.053 I/MonoDroid( 2359): at android.app.Fragment.performCreateView(Fragment.java:1700)
09-27 13:43:23.053 I/MonoDroid( 2359): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:890)
09-27 13:43:23.053 I/MonoDroid( 2359): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1062)
09-27 13:43:23.053 I/MonoDroid( 2359): at android.app.BackStackRecord.run(BackStackRecord.java:684)
09-27 13:43:23.053 I/MonoDroid( 2359): at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1447)
09-27 13:43:23.053 I/MonoDroid( 2359): at android.app.FragmentManagerImpl$1.run(FragmentManager.java:443)
09-27 13:43:23.053 I/MonoDroid( 2359): at android.os.Handler.handleCallback(Handler.java:733)
09-27 13:43:23.053 I/MonoDroid( 2359): at android.os.Handler.dispatchMessage(Handler.java:95)
09-27 13:43:23.053 I/MonoDroid( 2359): at android.os.Looper.loop(Looper.java:157)
09-27 13:43:23.053 I/MonoDroid( 2359): at android.app.ActivityThread.main(ActivityThread.java:5293)
09-27 13:43:23.053 I/MonoDroid( 2359): at java.lang.reflect.Method.invokeNative(Native Method)
09-27 13:43:23.053 I/MonoDroid( 2359): at java.lang.reflect.Method.invoke(Method.java:515)
09-27 13:43:23.053 I/MonoDroid( 2359): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
09-27 13:43:23.053 I/MonoDroid( 2359): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
09-27 13:43:23.053 I/MonoDroid( 2359): at dalvik.system.NativeStart.main(Native Method)
09-27 13:43:23.053 I/MonoDroid( 2359): Caused by: java.lang.IllegalArgumentException: Binary XML file line #1: Duplicate id 0x7f0a001d, tag null, or parent id 0x7f0a001c with another fragment for com.google.android.gms.maps.MapFragment
09-27 13:43:23.063 I/MonoDroid( 2359): at android.app.Activity.onCreateView(Activity.java:4940)
09-27 13:43:23.063 I/MonoDroid( 2359): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:695)
09-27 13:43:23.063 I/MonoDroid( 2359): ... 20 more
09-27 13:43:23.073 D/Mono ( 2359): DllImport searching in: '__Internal' ('(null)').
09-27 13:43:23.073 D/Mono ( 2359): Searching for 'java_interop_jnienv_throw'.
09-27 13:43:23.073 D/Mono ( 2359): Probing 'java_interop_jnienv_throw'.
09-27 13:43:23.073 D/Mono ( 2359): Found as 'java_interop_jnienv_throw'.
An unhandled exception occured.

In mgmain JNI_OnLoad

Answer

The stack trace gives the following error:

Duplicate id 0x7f0a001d, tag null, or parent id 0x7f0a001c with another fragment for com.google.android.gms.maps.MapFragment

You can read more about this issue here: Duplicate ID, tag null, or parent id with another fragment for com.google.android.gms.maps.MapFragment

So you may want to use replace() to ensure you do not inflate fragments inside fragments. Ensure that you remove your previous fragment before adding another.

There's a note about this here: https://developer.android.com/about/versions/android-4.2.html#NestedFragments

Note: You cannot inflate a layout into a fragment when that layout includes a <fragment>. Nested fragments are only supported when added to a fragment dynamically.

Comments