java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.sbi.myapplication1/com.example.sbi.myapplication1.loginhome}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v4.widget.DrawerLayout.setDrawerShadow(int, int)' on a null object reference

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 Volverine
, 10 months ago
Unable to start activity ComponentInfo{com.example.sbi.myapplication1/com.example.sbi.myapplication1.loginhome}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v4.widget.DrawerLayout.setDrawerShadow(int, int)' on a null object reference
via Stack Overflow by Keith
, 1 year ago
Unable to start activity ComponentInfo{com.domain.appname/com.domain.appname.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.domain.appname.NavigationDrawerFragment.setUp(int, android.support.v4.widget.DrawerLayout)' on a null object reference
via com.tr by Unknown author, 2 years ago
Unable to start activity ComponentInfo{com.uygulama/com.uygulama.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ImageView.setPadding(int, int, int, int)' on a null object reference
via stackoverflow.com by Unknown author, 1 year ago
Unable to start activity ComponentInfo{com.hoge.zousan.piyo/com.hoge.zousan.piyo.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.hoge.zousan.piyo.NavigationDrawerFragment.setUp(int, android.support.v4.widget.DrawerLayout)' on a null object reference
via openclassrooms.com by Unknown author, 2 years ago
Unable to start activity ComponentInfo{com.nickLPro.nicolas.ConsoRc/com.nickLPro.nicolas.ConsoRc.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.nickLPro.nicolas.ConsoRc.NavigationDrawerFragment.setUp(int, android.support.v4.widget.DrawerLayout)' on a null object reference
via Stack Overflow by nile
, 2 years ago
Unable to start activity ComponentInfo{com.nile.donow/com.nile.donow.DailiesActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.nile.donow.FragmentDrawer.setUp(int, android.support.v4.widget.DrawerLayout, android.support.v7.widget.Toolbar)' on a null object reference
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v4.widget.DrawerLayout.setDrawerShadow(int, int)' on a null object reference
at com.example.sbi.myapplication1.loginhome.onCreate(loginhome.java:49)
at android.app.Activity.performCreate(Activity.java:6001)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2261)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2368)
at android.app.ActivityThread.access$800(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1285)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5235)
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:898)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.