java.lang.NullPointerException

Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web224

  • via Unknown by Unknown author,
  • Stack trace

    • java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference at android.content.ContextWrapper.getResources(ContextWrapper.java:87) at android.view.ContextThemeWrapper.getResources(ContextThemeWrapper.java:81) at android.widget.Toast.<init>(Toast.java:102) at android.widget.Toast.makeText(Toast.java:259) at app.employeedbms.Result.entry(Result.java:112) at app.employeedbms.MainActivity.onClick_button(MainActivity.java:159) at java.lang.reflect.Method.invoke(Native Method) at android.view.View$DeclaredOnClickListener.onClick(View.java:4450) at android.view.View.performClick(View.java:5201) at android.view.View$PerformClick.run(View.java:21163) at android.os.Handler.handleCallback(Handler.java:746) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5443) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)

    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

    Hiren AmaliyarHiren Amaliyar
    13 times, last one
    justCodeitjustCodeit
    7 times, last one
    maxximaxxi
    4 times, last one
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitor2 times, last one
    16 more bugmates