java.lang.NullPointerException

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


Solutions on the web21520

Solution icon of github
via GitHub by agent4788
, 1 year ago
Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference

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

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

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

Solution icon of github
via GitHub by wvictor-rr
, 6 months ago
Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference

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

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

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

Solution icon of stackoverflow
via Stack Overflow by Nemanja Mitrovcan
, 1 year ago
Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference

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

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.view.ViewConfiguration.get(ViewConfiguration.java:389) at android.view.View.<init>(View.java:4064) at android.view.View.<init>(View.java:4188) at android.widget.ImageView.<init>(ImageView.java:150) at android.widget.ImageView.<init>(ImageView.java:145) at com.android.volley.toolbox.NetworkImageView.<init>(NetworkImageView.java:61) at com.android.volley.toolbox.NetworkImageView.<init>(NetworkImageView.java:57) at com.android.volley.toolbox.NetworkImageView.<init>(NetworkImageView.java:53) at com.mhcasia.android.fragment.HomeFragment.refreshBanners(HomeFragment.java:244) at com.mhcasia.android.fragment.HomeFragment.access$000(HomeFragment.java:49) at com.mhcasia.android.fragment.HomeFragment$1.onReceive(HomeFragment.java:77) at android.support.v4.content.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:297) at android.support.v4.content.LocalBroadcastManager.access$000(LocalBroadcastManager.java:46) at android.support.v4.content.LocalBroadcastManager$1.handleMessage(LocalBroadcastManager.java:116) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:7329) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

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

13 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
2 times, 3 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
3 more bugmates