If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.

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.

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

  • Crash: no empty constructor
    via GitHub by khk624
    •$InstantiationException: Unable to instantiate fragment com.wenming.weiswift.ui.login.activity.MainActivity$6: make sure class name exists, is public, and has an empty constructor that is public at at at at at at com.wenming.weiswift.ui.login.activity.MainActivity.onCreate( at at at at at$800( at$H.handleMessage( at android.os.Handler.dispatchMessage( at android.os.Looper.loop( at at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke( at$ at at dalvik.system.NativeStart.main(Native Method) Caused by: 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( at ... 19 more

    Users with the same issue

    8 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown User
    178 times, last one,
    Andreas Häber
    2 times, last one,
    39 more bugmates