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


Solutions on the web

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

Solution icon of github
Unable to start activity ComponentInfo{com.casimirlab.simpleDeadlines/com.casimirlab.simpleDeadlines.ui.MainActivity}: java.lang.IllegalStateException: Fragment DeadlineListFragment{ad2ef970} not attached to Activity

Solution icon of stackoverflow
via Stack Overflow by Nicx
, 1 year ago
Unable to start activity ComponentInfo{com.nicx.amazing/com.nicx.amazing.TabActivity}: java.lang.IllegalStateException: Already attached

Solution icon of stackoverflow
Unable to start activity ComponentInfo{com.ExampleActivity}: java.lang.IllegalStateException: DialogFragment can not be attached to a container view

Solution icon of stackoverflow
Unable to start activity ComponentInfo{com.rufflez.slidingmenuexample/com.rufflez.slidingmenuexample.MainActivity}: java.lang.IllegalStateException: RandomList must be attached to a SherlockFragmentActivity.

Solution icon of web
Unable to start activity ComponentInfo{com.rufflez.slidingmenuexample/com.rufflez.slidingmenuexample.MainActivity}: java.lang.IllegalStateException: RandomList must be attached to a SherlockFragmentActivity.

Solution icon of web
Unable to start activity ComponentInfo{edu.self/edu.self.A}: java.lang.IllegalStateException: No activity

Solution icon of stackoverflow
Unable to start activity ComponentInfo{com.my.package/com.my.package.activities.MainActivity}: java.lang.IllegalStateException: Fragment already added: ContactFragment{42263030 #0 id=0x7f0a006d}

Solution icon of stackoverflow
Unable to start activity ComponentInfo{com.golfex.citi/com.golfex.citi.MainActivity}: java.lang.IllegalStateException: No instantiated fragment for index #0

Solution icon of web
Unable to start activity ComponentInfo{edu.self/edu.self.A}: java.lang.IllegalStateException: No activity

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

2 times, 1 year ago
2 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
35 times, 1 year ago
Samebug visitor profile picture
Unknown user
2 times, 1 year ago
2 more bugmates