java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.listeventhandling/com.android.listeventhandling.MainActivity}: java.lang.IllegalStateException: Fragment MyListFragment{40d6b5e8} not attached to Activity

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by BST Kaal
, 1 year ago
Unable to start activity ComponentInfo{com.android.listeventhandling/com.android.listeventhandling.MainActivity}: java.lang.IllegalStateException: Fragment MyListFragment{40d6b5e8} not attached to Activity
via GitHub by eileenfan
, 4 months ago
Unable to start activity ComponentInfo{com.casimirlab.simpleDeadlines/com.casimirlab.simpleDeadlines.ui.MainActivity}: java.lang.IllegalStateException: Fragment DeadlineListFragment{ad2ef970} not attached to Activity
via Stack Overflow by Nicx
, 2 years ago
Unable to start activity ComponentInfo{com.nicx.amazing/com.nicx.amazing.TabActivity}: java.lang.IllegalStateException: Already attached
via Stack Overflow by salcosand
, 1 year ago
Unable to start activity ComponentInfo{com.ExampleActivity}: java.lang.IllegalStateException: DialogFragment can not be attached to a container view
via Stack Overflow by kaibuki
, 2 years ago
Unable to start activity ComponentInfo{com.rufflez.slidingmenuexample/com.rufflez.slidingmenuexample.MainActivity}: java.lang.IllegalStateException: RandomList must be attached to a SherlockFragmentActivity.
via programask.com by Unknown author, 2 years ago
Unable to start activity ComponentInfo{com.rufflez.slidingmenuexample/com.rufflez.slidingmenuexample.MainActivity}: java.lang.IllegalStateException: RandomList must be attached to a SherlockFragmentActivity.
java.lang.IllegalStateException: Fragment MyListFragment{40d6b5e8} not attached to Activity
at android.app.Fragment.getResources(Fragment.java:817)
at com.android.listeventhandling.MyListFragment.(MyListFragment.java:12)
at com.android.listeventhandling.MainActivity.onCreate(MainActivity.java:18)
at android.app.Activity.performCreate(Activity.java:4531)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1071)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2150)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2229)
at android.app.ActivityThread.access$600(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1261)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:4945)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)

Users with the same issue

19 times, 1 year ago
35 times, 1 year ago
2 times, 1 year ago
Samebug visitor profile picture
Unknown user
2 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.