java.lang.InstantiationException: can't instantiate class com.wenming.weiswift.ui.login.activity.MainActivity$6; no empty constructor

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

Samebug tips

,
Expert tip

This happens when you try to instantiate a class that can't be instantiated, either because the class object is abstract, an interface, an array class, a primitive type, void, or because the class has no nullary constructor.

Solutions on the web

via GitHub by wenmingvs
, 1 year ago
can't instantiate class com.wenming.weiswift.ui.login.activity.MainActivity$6; no empty constructor
via GitHub by wenmingvs
, 1 year ago
can't instantiate class com.wenming.weiswift.ui.login.activity.MainActivity$6; no empty constructor
via GitHub by wenmingvs
, 1 year ago
can't instantiate class com.wenming.weiswift.ui.login.activity.MainActivity$6; no empty constructor
via GitHub by fofri
, 2 years ago
can't instantiate class it.neokree.example.MainActivity$FragmentIndex; no empty constructor
via GitHub by negue
, 1 year ago
can't instantiate class com.habitrpg.android.habitica.ui.fragments.ChatListFragment; no empty constructor
via GitHub by negue
, 1 year ago
can't instantiate class com.habitrpg.android.habitica.ui.fragments.ChatListFragment; no empty constructor
java.lang.InstantiationException: can't instantiate class com.wenming.weiswift.ui.login.activity.MainActivity$6; no empty constructor
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1208)
at android.support.v4.app.Fragment.instantiate(Fragment.java:420)
at android.support.v4.app.FragmentState.instantiate(Fragment.java:102)
at android.support.v4.app.FragmentManagerImpl.restoreAllState(FragmentManager.java:1952)
at android.support.v4.app.FragmentController.restoreAllState(FragmentController.java:144)
at com.wenming.weiswift.ui.login.activity.MainActivity.onCreate(MainActivity.java:60)
at android.app.Activity.performCreate(Activity.java:5356)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2163)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2258)
at android.app.ActivityThread.access$800(ActivityThread.java:147)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1211)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5135)
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:795)

Users with the same issue

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

Write tip

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