title: ClassNotFoundException reading a Serializable object in a class extending MapFragment in onSaveInstanceState
body: <p>I have a class extending the SupportMapFragment where i load some data from backend and display the Markers. I also have another fragment which i display the details corresponding to the selected marker on the map. I am displaying the details fragment below the map in portrait mode and side by side in landscape.</p>
  
  <pre><code>public class MapDisplayFragment extends SupportMapFragment {
  private ArrayList&lt;ShowLocation&gt; locations = null;
  
  public void onViewCreated(View view, Bundle savedInstanceState) {
      if (savedInstanceState != null) {
      locations = (ArrayList&lt;ShowLocation&gt;)savedInstanceState.getSerializable("LOCATIONS");
      }
  }
  @Override
  public void onSaveInstanceState(Bundle outState) {
    if (outState == null) {
   outState = new Bundle();
    }
    outState.putSerializable("LOCATIONS", locations);
    super.onSaveInstanceState(outState);
  }
  </code></pre>
  
  <p>I have a class which implements Serializable which is used in the derived map class.  I use the onSaveInstanceState to store the object so that i dont have to retrieve the data from the backend again. but the app crashes with <em>java.lang.RuntimeException: Parcelable encounteredClassNotFoundException reading a Serializable object</em> when i flip the device.</p>
  
  <pre><code>public class ShowLocation implements Serializable {
      private String geoCodeLat = Constants.EMPTY_STRING;
      private String geoCodeLng = Constants.EMPTY_STRING;
      ....
      public String getGeoCodeLat() {
         return geoCodeLat;
      }
      public void setGeoCodeLat(String geoCodeLat) {
         this.geoCodeLat = geoCodeLat;
      }
  
      public String getGeoCodeLng() {
         return geoCodeLng;
      }
  
      public void setGeoCodeLng(String geoCodeLng) {
          this.geoCodeLng = geoCodeLng;
      }
      ....
  }
  </code></pre>
  
  <p>I have defined the layout as follows:</p>
  
  <pre><code>&lt;LinearLayout
          android:id="@+id/layoutMapData"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:orientation="vertical" &gt;
  
          &lt;fragment
              android:id="@+id/mapFrag"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:layout_weight="0.5"
              class="com.test.appFragments.MapDisplayFragment" /&gt;
  
          &lt;LinearLayout
              android:id="@+id/layoutDetails"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
              android:layout_weight="0.5"
              android:visibility="gone" &gt;
          &lt;/LinearLayout&gt;
      &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>If anyone has come accross this issue or if there is a solution to this issue please help me out.</p>