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 web46605

Solution icon of stackoverflow
via Stack Overflow by Volverine
, 6 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 github
via GitHub by Alexendoo
, 1 year ago
Unable to start activity ComponentInfo{me.ccrama.redditslide/me.ccrama.redditslide.Activities.SubredditOverview}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v4.widget.DrawerLayout.setDrawerLockMode(int, int)' on a null object reference

Solution icon of github
Unable to start activity ComponentInfo{me.ccrama.redditslide/me.ccrama.redditslide.Activities.SubredditOverviewSingle}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v4.widget.DrawerLayout.setDrawerLockMode(int, int)' on a null object reference

Solution icon of stackoverflow
Unable to start activity ComponentInfo{ru.livemaster.zhurnal/ru.livemaster.zhurnal.activity.main.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v4.app.Fragment.setNextTransition(int, int)' on a null object reference

Solution icon of stackoverflow
via Stack Overflow by Used
, 3 weeks ago
Unable to start activity ComponentInfo{com.carte.alex.test3/com.carte.alex.test3.Main2Activity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.CheckedTextView.setCompoundDrawablesWithIntrinsicBounds(int, int, int, int)' on a null object reference

Solution icon of web
Unable to start activity ComponentInfo{com.alwaysorg.chatfoss/com.codelegs.ao.ui.LoginActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.ContentFrameLayout.setDecorPadding(int, int, 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 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 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 stackoverflow
Unable to start activity ComponentInfo{pasirgudangcouncilstate.infocenter/pasirgudangcouncilstate.infocenter.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v4.view.PagerTabStrip.setTextColor(int)' 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.