When I rotated an Android tablet in seeing a private dialog

Many webpages told me that an internal DialogFragment class must be “public”. I wondered what happens if it is “private”. I had tried, and I got:

07-14 03:50:48.849  1500  1500 E AndroidRuntime: FATAL EXCEPTION: main
07-14 03:50:48.849  1500  1500 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{jp.gr.java_conf.neko_daisuki.android.animator/jp.gr.java_conf.neko_daisuki.android.animator.MainActivity}: android.support.v4.app.Fragment$InstantiationException: Unable to instantiate fragment jp.gr.java_conf.neko_daisuki.android.animator.MainActivity$SelectProjectDialog: make sure class name exists, is public, and has an empty constructor that is public
07-14 03:50:48.849  1500  1500 E AndroidRuntime:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1815)
07-14 03:50:48.849  1500  1500 E AndroidRuntime:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1831)
07-14 03:50:48.849  1500  1500 E AndroidRuntime:     at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3188)
07-14 03:50:48.849  1500  1500 E AndroidRuntime:     at android.app.ActivityThread.access$600(ActivityThread.java:122)
07-14 03:50:48.849  1500  1500 E AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1028)
07-14 03:50:48.849  1500  1500 E AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:99)
07-14 03:50:48.849  1500  1500 E AndroidRuntime:     at android.os.Looper.loop(Looper.java:132)
07-14 03:50:48.849  1500  1500 E AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:4123)
07-14 03:50:48.849  1500  1500 E AndroidRuntime:     at java.lang.reflect.Method.invokeNative(Native Method)
07-14 03:50:48.849  1500  1500 E AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:491)
07-14 03:50:48.849  1500  1500 E AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
07-14 03:50:48.849  1500  1500 E AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
07-14 03:50:48.849  1500  1500 E AndroidRuntime:     at dalvik.system.NativeStart.main(Native Method)
07-14 03:50:48.849  1500  1500 E AndroidRuntime: Caused by: android.support.v4.app.Fragment$InstantiationException: Unable to instantiate fragment jp.gr.java_conf.neko_daisuki.android.animator.MainActivity$SelectProjectDialog: make sure class name exists, is public, and has an empty constructor that is public
07-14 03:50:48.849  1500  1500 E AndroidRuntime:     at android.support.v4.app.Fragment.instantiate(Fragment.java:409)
07-14 03:50:48.849  1500  1500 E AndroidRuntime:     at android.support.v4.app.FragmentState.instantiate(Fragment.java:97)
07-14 03:50:48.849  1500  1500 E AndroidRuntime:     at android.support.v4.app.FragmentManagerImpl.restoreAllState(FragmentManager.java:1767)
07-14 03:50:48.849  1500  1500 E AndroidRuntime:     at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:208)
07-14 03:50:48.849  1500  1500 E AndroidRuntime:     at jp.gr.java_conf.neko_daisuki.android.animator.MainActivity.onCreate(MainActivity.java:589)
07-14 03:50:48.849  1500  1500 E AndroidRuntime:     at android.app.Activity.performCreate(Activity.java:4397)
07-14 03:50:48.849  1500  1500 E AndroidRuntime:     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1048)
07-14 03:50:48.849  1500  1500 E AndroidRuntime:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1779)
07-14 03:50:48.849  1500  1500 E AndroidRuntime:     ... 12 more
07-14 03:50:48.849  1500  1500 E AndroidRuntime: Caused by: java.lang.IllegalAccessException: access to class not allowed
07-14 03:50:48.849  1500  1500 E AndroidRuntime:     at java.lang.Class.newInstanceImpl(Native Method)
07-14 03:50:48.849  1500  1500 E AndroidRuntime:     at java.lang.Class.newInstance(Class.java:1301)
07-14 03:50:48.849  1500  1500 E AndroidRuntime:     at android.support.v4.app.Fragment.instantiate(Fragment.java:394)
07-14 03:50:48.849  1500  1500 E AndroidRuntime:     ... 19 more
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s