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

Solutions on the web

via Stack Overflow by G.Al
, 1 year ago
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
via Stack Overflow by Hao
, 1 year ago
Attempt to invoke virtual method 'void android.support.v4.view.ViewPager.setAdapter(android.support.v4.view.PagerAdapter)' on a null object reference
via Stack Overflow by Matt Brown
, 1 year ago
Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
via Stack Overflow by guitarhero23
, 6 months ago
Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
via Stack Overflow by Sveiny
, 1 year ago
Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
via Stack Overflow by Bryce Wharton
, 2 years ago
Attempt to invoke virtual method 'android.view.View android.view.Window.findViewById(int)' on a null object reference
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.(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)