title: java.lang.RuntimeException: Parcelable encountered IOException writing serializable object in Android passing ArrayList object
body: <p>I want to pass my ArrayList object to another activity, using a DataWrapper that implements <code>Serializable</code>. <br/>
  I followed the answer provided here: <a href="https://stackoverflow.com/q/15747727/3879470">Pass arraylist of user defined objects to Intent android</a>.<br/>
  I am starting the another Activity from <code>MPAndroidChart</code> library <code>PieChart</code>'s <code>OnChartGestureListener()</code>. This is how I passed my ArrayList object <code>threadList</code>:</p>
  
  <pre><code>mChart.setOnChartGestureListener(new OnChartGestureListener() {
  @Override
  public void onChartSingleTapped(MotionEvent me) {
      Intent intent = new Intent(MainActivity.this, TextersSmsActivity.class);
      intent.putExtra("threadList", new DataWrapper(threadList));
      MainActivity.this.startActivity(intent);
  }
  //.....
  }
  </code></pre>
  
  <p>I implemented the DataWrapper class like this:</p>
  
  <pre><code>public class DataWrapper implements Serializable {
  private static final long serialVersionUID = 100L;
  private ArrayList&lt;OneThread&gt; threadList;
  
     public DataWrapper(ArrayList&lt;OneThread&gt; threadList) {
        this.threadList = threadList;
     }
  
     public ArrayList&lt;OneThread&gt; getThreadList() {
        return threadList;
     }
  }
  </code></pre>
  
  <p>And getting the <code>Parcelable encountered IOException writing serializable object</code> error.
  Here is my Logcat:</p>
  
  <pre><code>11-29 21:12:09.919: E/MessageQueue-JNI(21550): java.lang.RuntimeException: Parcelable encountered IOException writing serializable object (name = com.myproj.DataWrapper)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.os.Parcel.writeSerializable(Parcel.java:1316)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.os.Parcel.writeValue(Parcel.java:1264)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.os.Parcel.writeArrayMapInternal(Parcel.java:618)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.os.Bundle.writeToParcel(Bundle.java:1692)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.os.Parcel.writeBundle(Parcel.java:636)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.content.Intent.writeToParcel(Intent.java:7013)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:2076)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.app.Instrumentation.execStartActivity(Instrumentation.java:1419)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.app.Activity.startActivityForResult(Activity.java:3424)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.app.Activity.startActivityForResult(Activity.java:3385)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:817)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.app.Activity.startActivity(Activity.java:3627)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.app.Activity.startActivity(Activity.java:3595)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at com.myproj.MainActivity$11.onChartSingleTapped(MainActivity.java:967)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at com.github.mikephil.charting.listener.PieRadarChartTouchListener.onSingleTapUp(PieRadarChartTouchListener.java:89)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.view.GestureDetector.onTouchEvent(GestureDetector.java:595)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at com.github.mikephil.charting.listener.PieRadarChartTouchListener.onTouch(PieRadarChartTouchListener.java:40)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at com.github.mikephil.charting.charts.PieRadarChartBase.onTouchEvent(PieRadarChartBase.java:56)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.view.View.dispatchTouchEvent(View.java:7706)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2068)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1515)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.app.Activity.dispatchTouchEvent(Activity.java:2458)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.support.v7.app.ActionBarActivityDelegateICS$WindowCallbackWrapper.dispatchTouchEvent(ActionBarActivityDelegateICS.java:268)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2016)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.view.View.dispatchPointerEvent(View.java:7886)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:3947)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3826)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3392)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3442)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3411)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3518)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3419)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3575)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3392)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3442)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3411)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3419)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3392)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5532)
  11-29 21:12:09.919: E/MessageQueue-JNI(21550):  at android.view.ViewRootImpl.doP
  </code></pre>
  
  <p>I followed the answer (to pass array list objects) in the link above but getting the Error, what is causing the error and how to remove it?</p>