title: Xamarin.Android : Android.Views.InflateException in MapFragment when launched second time
body: <p>I am trying to use the android map to locate the specified address. I am able to locate and mark the address on map for the first time successfully. But when I try to locate the another address it throws an Exception in the fragment :</p>
  
  <blockquote>
    <p>Binary XML file line #1: Error inflating class fragment</p>
  </blockquote>
  
  <p><strong>axml layout:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;fragment xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/myMap"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            class="com.google.android.gms.maps.MapFragment" /&gt;
  </code></pre>
  
  <p>The problem is that when the fragment is replaced for the second time to locate new address, android is unable to inflate from axml. It crashes on line:</p>
  
  <pre><code>view = inflater.Inflate(Resource.Layout.map_layout, null);
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/ke87S.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ke87S.png" alt="enter image description here"></a></p>
  
  <p>I gone through these links, but could find the solution:</p>
  
  <p><a href="https://stackoverflow.com/questions/13905977/android-map-v2-error-on-second-inflating">Android map v2 error on second inflating</a></p>
  
  <p><a href="https://stackoverflow.com/questions/17722851/android-supportmapfragment-error-when-openning-for-second-time">Android - SupportMapFragment error when openning for second time</a></p>
  
  <p><a href="https://forums.xamarin.com/discussion/7378/google-maps-wont-work-error-on-fragmenttransaction" rel="nofollow noreferrer">https://forums.xamarin.com/discussion/7378/google-maps-wont-work-error-on-fragmenttransaction</a></p>
  
  <p>I also tried using <code>SupportMapFragment</code>, behaviour is same.</p>