java.lang.RuntimeException

Unable to instantiate activity ComponentInfo{com.example.android.stimmenauswerter/com.example.android.stimmenauswerter.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.Window$Callback android.view.Window.getCallback()' on a null object reference

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web45602

  • via Stack Overflow by Julian
    , 10 months ago
    Unable to instantiate activity ComponentInfo{com.example.android.stimmenauswerter/com.example.android.stimmenauswerter.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.Window$Callback android.view.Window.getCallback()' on a null object reference
  • Unable to instantiate activity ComponentInfo{com.example.android.appName/com.example.android.appName.LoginActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.Window$Callback android.view.Window.getCallback()' on a null object reference
  • via Stack Overflow by CJovany
    , 1 year ago
    Unable to instantiate activity ComponentInfo{app.jovany.com.memorama/app.jovany.com.memorama.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.Window$Callback android.view.Window.getCallback()' on a null object reference
  • Stack trace

    • java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.android.stimmenauswerter/com.example.android.stimmenauswerter.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.Window$Callback android.view.Window.getCallback()' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3093) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349) at android.app.ActivityThread.access$1100(ActivityThread.java:221) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:158) at android.app.ActivityThread.main(ActivityThread.java:7225) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.Window$Callback android.view.Window.getCallback()' on a null object reference at android.support.v7.app.AppCompatDelegateImplBase.<init>(AppCompatDelegateImplBase.java:72) at android.support.v7.app.AppCompatDelegateImplV7.<init>(AppCompatDelegateImplV7.java:146) at android.support.v7.app.AppCompatDelegateImplV11.<init>(AppCompatDelegateImplV11.java:28) at android.support.v7.app.AppCompatDelegateImplV14.<init>(AppCompatDelegateImplV14.java:41) at android.support.v7.app.AppCompatDelegateImplV23.<init>(AppCompatDelegateImplV23.java:29) at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:191) at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:173) at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:511) at android.support.v7.app.AppCompatActivity.findViewById(AppCompatActivity.java:183) at com.example.android.stimmenauswerter.MainActivity.<init>(MainActivity.java:21) at java.lang.Class.newInstance(Native Method) at android.app.Instrumentation.newActivity(Instrumentation.java:1095) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3083)

    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

    Unknown user
    Once, 1 year ago