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 user3262438
, 1 year ago
Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
via Stack Overflow by Abhi
, 1 year ago
Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
via Stack Overflow by Android007
, 2 years ago
Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
via Stack Overflow by Larsus
, 4 months ago
Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
via Stack Overflow by Mina Dahesh
, 2 years ago
Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
via Stack Overflow by Lazar Kukolj
, 2 years ago
Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
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.support.v7.app.AppCompatActivity.getResources(AppCompatActivity.java:542) at android.widget.Toast.<init>(Toast.java:102) at android.widget.Toast.makeText(Toast.java:259) at com.exist.kelvs.retrofit2.MainActivity.getter(MainActivity.java:55) at com.exist.kelvs.retrofit2.RetrofitHandler$1.success(RetrofitHandler.java:41) at com.exist.kelvs.retrofit2.RetrofitHandler$1.success(RetrofitHandler.java:28) at retrofit.CallbackRunnable$1.run(CallbackRunnable.java:45) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)