android - Instantiation Exception: no empty constructor -
i maintain getting next error in android app when launch app:
10-07 22:00:07.416 21555-21555/com.antechdevelopment.notificationreminders e/androidruntime﹕ fatal exception: main process: com.antechdevelopment.notificationreminders, pid: 21555 java.lang.runtimeexception: unable start activity componentinfo{com.antechdevelopment.notificationreminders/com.antechdevelopment.notificationreminders.screens.mainactivity}: android.support.v4.app.fragment$instantiationexception: unable instantiate fragment com.antechdevelopment.notificationreminders.screens.mainactivity$newreminderfragment: create sure class name exists, public, , has empty constructor public @ android.app.activitythread.performlaunchactivity(activitythread.java:2305) @ android.app.activitythread.handlelaunchactivity(activitythread.java:2363) @ android.app.activitythread.access$900(activitythread.java:161) @ android.app.activitythread$h.handlemessage(activitythread.java:1265) @ android.os.handler.dispatchmessage(handler.java:102) @ android.os.looper.loop(looper.java:157) @ android.app.activitythread.main(activitythread.java:5356) @ java.lang.reflect.method.invokenative(native method) @ java.lang.reflect.method.invoke(method.java:515) @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:1265) @ com.android.internal.os.zygoteinit.main(zygoteinit.java:1081) @ dalvik.system.nativestart.main(native method) caused by: android.support.v4.app.fragment$instantiationexception: unable instantiate fragment com.antechdevelopment.notificationreminders.screens.mainactivity$newreminderfragment: create sure class name exists, public, , has empty constructor public @ android.support.v4.app.fragment.instantiate(fragment.java:413) @ android.support.v4.app.fragmentstate.instantiate(fragment.java:97) @ android.support.v4.app.fragmentmanagerimpl.restoreallstate(fragmentmanager.java:1790) @ android.support.v4.app.fragmentactivity.oncreate(fragmentactivity.java:213) @ com.antechdevelopment.notificationreminders.screens.mainactivity.oncreate(mainactivity.java:96) @ android.app.activity.performcreate(activity.java:5426) @ android.app.instrumentation.callactivityoncreate(instrumentation.java:1105) @ android.app.activitythread.performlaunchactivity(activitythread.java:2269) at android.app.activitythread.handlelaunchactivity(activitythread.java:2363) at android.app.activitythread.access$900(activitythread.java:161) at android.app.activitythread$h.handlemessage(activitythread.java:1265) at android.os.handler.dispatchmessage(handler.java:102) at android.os.looper.loop(looper.java:157) at android.app.activitythread.main(activitythread.java:5356) at java.lang.reflect.method.invokenative(native method) at java.lang.reflect.method.invoke(method.java:515) at com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:1265) at com.android.internal.os.zygoteinit.main(zygoteinit.java:1081) at dalvik.system.nativestart.main(native method) caused by: java.lang.instantiationexception: can't instantiate class com.antechdevelopment.notificationreminders.screens.mainactivity$newreminderfragment; no empty constructor @ java.lang.class.newinstanceimpl(native method) @ java.lang.class.newinstance(class.java:1208) @ android.support.v4.app.fragment.instantiate(fragment.java:402) at android.support.v4.app.fragmentstate.instantiate(fragment.java:97) at android.support.v4.app.fragmentmanagerimpl.restoreallstate(fragmentmanager.java:1790) at android.support.v4.app.fragmentactivity.oncreate(fragmentactivity.java:213) at com.antechdevelopment.notificationreminders.screens.mainactivity.oncreate(mainactivity.java:96) at android.app.activity.performcreate(activity.java:5426) at android.app.instrumentation.callactivityoncreate(instrumentation.java:1105) at android.app.activitythread.performlaunchactivity(activitythread.java:2269) at android.app.activitythread.handlelaunchactivity(activitythread.java:2363) at android.app.activitythread.access$900(activitythread.java:161) at android.app.activitythread$h.handlemessage(activitythread.java:1265) at android.os.handler.dispatchmessage(handler.java:102) at android.os.looper.loop(looper.java:157) at android.app.activitythread.main(activitythread.java:5356) at java.lang.reflect.method.invokenative(native method) at java.lang.reflect.method.invoke(method.java:515) at com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:1265) at com.android.internal.os.zygoteinit.main(zygoteinit.java:1081) at dalvik.system.nativestart.main(native method)
however, clearly have empty constructor.... ??? here's code it's referring to:
public class newreminderfragment extends fragment { public newreminderfragment() { } @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { view rootview = inflater.inflate(r.layout.new_reminder_fragment, container, false); ... homecoming rootview; } }
any 1 have ideas??? annoying, , not publish!
i've done reasearch no avail.
declare fragment static:
public static class newreminderfragment extends fragment
android instantiationexception
No comments:
Post a Comment