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

Stack Overflow | G.Al | 3 months ago
  1. 0

    my android app crashes after i made some changes in styles.xml

    Stack Overflow | 3 months ago | G.Al
    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
  2. 0

    strange crash

    GitHub | 3 years ago | jeetdholakia
    java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.drawtextsample/com.android.camera.CropImage}: java.lang.NullPointerException
  3. 0

    Nullpointer in CropImage in lvillani/android-cropimage

    Stack Overflow | 3 years ago | Mihir
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    How do I create custom classes as subroutines

    Stack Overflow | 4 years ago | fergatron
    java.lang.NullPointerException
  6. 0

    Backgroundimage for a tab

    Stack Overflow | 3 years ago | user2051194
    java.lang.NullPointerException

  1. Nisha Singh 1 times, last 8 months ago
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. 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()
  2. Android Platform
    Activity.getActionBar
    1. android.app.Activity.initWindowDecorActionBar(Activity.java:2162)
    2. android.app.Activity.getActionBar(Activity.java:2122)
    2 frames
  3. com.example.gentaliu
    MainActivity.<init>
    1. com.example.gentaliu.photoeditor.MainActivity.<init>(MainActivity.java:42)
    1 frame
  4. Java RT
    Class.newInstance
    1. java.lang.reflect.Constructor.newInstance(Native Method)
    2. java.lang.Class.newInstance(Class.java:1606)
    2 frames
  5. Android Platform
    ActivityThread.performLaunchActivity
    1. android.app.Instrumentation.newActivity(Instrumentation.java:1066)
    2. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2347)
    2 frames