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


Solutions on the web17699

Solution icon of stackoverflow
via Stack Overflow by Volverine
, 8 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

Solution icon of web
via com.tr by Unknown author, 1 year 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

Solution icon of stackoverflow
Unable to start activity ComponentInfo{.Categories}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.RelativeLayout.setVisibility(int)' on a null object reference

Solution icon of stackoverflow
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

Solution icon of web
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

Solution icon of stackoverflow
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

Solution icon of web
via openclassrooms.com by Unknown author, 1 year 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

Solution icon of github
via GitHub by codeguru42
, 1 year ago
Unable to start activity ComponentInfo{bbct.android/bbct.android.lite.provider.LiteActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Object.hashCode()' on a null object reference

Solution icon of github
via GitHub by Aman91Goyal
, 1 year ago
Unable to start activity ComponentInfo{ocr.groove.competent.ocr/groove.competent.detail.DetailData}: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.util.ArrayList.size()' on a null object reference

Solution icon of github
via GitHub by jsarabia1247
, 9 months ago
Unable to start activity ComponentInfo{wycliffeassociates.recordingapp/wycliffeassociates.recordingapp.Recording.RecordingScreen}: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference

Stack trace

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
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2308)
	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)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)
Caused by: 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)
	... 10 more

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

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.