title: rjava.lang.IllegalArgumentException on startActivity(intent,bundle animantion)
body: <p>Hi I am using following code but sometimes app is crashing with  error:</p>
  
  <blockquote>
    <p>java.lang.IllegalArgumentException  in   startActivity(slideactivity, bndlanimation);</p>
  </blockquote>
  
  <pre><code>if (android.os.Build.VERSION.SDK_INT &gt;= 16) {
         Bundle bndlanimation = ActivityOptions.makeCustomAnimation(getApplicationContext(), R.anim.slide_in, R.anim.slide_out).toBundle();
         startActivity(slideactivity, bndlanimation);
       } else
         startActivity(slideactivity);
         finish();
  </code></pre>
  
  <p>Here is the crash logs </p>
  
  <blockquote>
    <p>java.lang.IllegalArgumentException 1  at
    android.os.Parcel.readException(Parcel.java:1553) 2   at
    android.os.Parcel.readException(Parcel.java:1499) 3   at
    android.app.ActivityManagerProxy.isTopOfTask(ActivityManager‌​Native.java:4465)
    4 at android.app.Activity.isTopOfTask(Activity.java:5361) 5   at
    android.app.Activity.startActivityForResult(Activity.java:37‌​70) 6   at
    android.app.Activity.startActivity(Activity.java:4003) 7  at
    com.tapcibo.tapcibo.uifragment.LaunchActivity.a(SourceFile:1‌​05)</p>
  </blockquote>