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

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web52

  • Stack trace

    • 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 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2194) 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) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.IllegalStateException: Fragment MyListFragment{40d6b5e8} not attached to Activity at android.app.Fragment.getResources(Fragment.java:817) at com.android.listeventhandling.MyListFragment.<init>(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) ... 11 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Stefan BrauneStefan Braune
    2 times, last one
    bayukresnobayukresno
    2 times, last one
    Unknown visitor
    Unknown visitorOnce,
    brunosatrianibrunosatriani
    35 times, last one
    Unknown visitor
    Unknown visitor4 times, last one
    2 more bugmates