java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • strange crash
    via GitHub by jeetdholakia
    ,
  • Backgroundimage for a tab
    via Stack Overflow by user2051194
    ,
    • java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.Window.getDecorView()' on a null object reference I don't know what to do. Here is the logcat log java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.george.photoeditor/com.example.gentaliu.photoeditor.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.Window.getDecorView()' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2357) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512) at android.app.ActivityThread.access$1200(ActivityThread.java:165) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1373) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5593) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.Window.getDecorView()' on a null object reference at android.app.Activity.initWindowDecorActionBar(Activity.java:2162) at android.app.Activity.getActionBar(Activity.java:2122) at com.example.gentaliu.photoeditor.MainActivity.<init>(MainActivity.java:42) at java.lang.reflect.Constructor.newInstance(Native Method) at java.lang.Class.newInstance(Class.java:1606) at android.app.Instrumentation.newActivity(Instrumentation.java:1066) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2347)

    Users with the same issue

    Nisha Singh
    1 times, last one,