title: Getting a java.lang.IllegalStateException: No activity when resuming an activity
body: <p>I'm getting a weird error in one of my activities. I can't figure out why this is happening.</p>
  
  <p>I have an <code>Activity</code> which displays search results to the user. When he taps on one of them, a detailed page for that result is shown, and when he closes that <code>Activity</code> it goes back to the search result screen. It works fine for the most part, except on certain devices where it crashes as soon as the <code>Activity</code> resumes.</p>
  
  <p>The stack trace is also useless as it is being thrown internally by the support fragment manager.</p>
  
  <pre><code>03-18 15:32:48.987: E/AndroidRuntime(26456): FATAL EXCEPTION: main
  03-18 15:32:48.987: E/AndroidRuntime(26456): java.lang.IllegalStateException: No activity
  03-18 15:32:48.987: E/AndroidRuntime(26456):    at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1075)
  03-18 15:32:48.987: E/AndroidRuntime(26456):    at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1070)
  03-18 15:32:48.987: E/AndroidRuntime(26456):    at android.support.v4.app.FragmentManagerImpl.dispatchResume(FragmentManager.java:1871)
  03-18 15:32:48.987: E/AndroidRuntime(26456):    at android.support.v4.app.FragmentActivity.onResumeFragments(FragmentActivity.java:455)
  03-18 15:32:48.987: E/AndroidRuntime(26456):    at android.support.v4.app.FragmentActivity$1.handleMessage(FragmentActivity.java:91)
  03-18 15:32:48.987: E/AndroidRuntime(26456):    at android.os.Handler.dispatchMessage(Handler.java:99)
  03-18 15:32:48.987: E/AndroidRuntime(26456):    at android.os.Looper.loop(Looper.java:150)
  03-18 15:32:48.987: E/AndroidRuntime(26456):    at android.app.ActivityThread.main(ActivityThread.java:4333)
  03-18 15:32:48.987: E/AndroidRuntime(26456):    at java.lang.reflect.Method.invokeNative(Native Method)
  03-18 15:32:48.987: E/AndroidRuntime(26456):    at java.lang.reflect.Method.invoke(Method.java:507)
  03-18 15:32:48.987: E/AndroidRuntime(26456):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)
  03-18 15:32:48.987: E/AndroidRuntime(26456):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
  03-18 15:32:48.987: E/AndroidRuntime(26456):    at dalvik.system.NativeStart.main(Native Method)
  03-18 15:32:48.987: W/ActivityManager(241):   Force finishing activity com.my.app/.SearchActivity
  </code></pre>
  
  <p>My <code>Activity</code> is extending <code>FragmentActivity</code>, but only because I need to use the <code>LoaderManager</code>. Moving to the standard library is out of the question since my app has to support Android 2.3.</p>
  
  <p>I have tried updating to the newer version of the support library, and reverting to an older version, but no luck.</p>
  
  <p>How can I fix this?</p>