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

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 codegur.com by Unknown author, 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 Victor Vicari
, 1 year ago
Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
via GitHub by thunter1000
, 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 Newbie009
, 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 WesVleuten
, 10 months ago
Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
via Stack Overflow by Unknown author, 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.view.ViewConfiguration.get(ViewConfiguration.java:383)
at android.view.View.(View.java:3700)
at android.view.View.(View.java:3797)
at android.widget.TextView.(TextView.java:690)
at android.widget.Button.(Button.java:111)
at android.widget.CompoundButton.(CompoundButton.java:85)
at android.widget.RadioButton.(RadioButton.java:65)
at android.widget.RadioButton.(RadioButton.java:61)
at android.widget.RadioButton.(RadioButton.java:57)
at android.widget.RadioButton.(RadioButton.java:53)
at in.arnavvohra.arry2.Fragments.ChannelDiscussionsFragment$2.onChildAdded(ChannelDiscussionsFragment.java:129)
at com.google.android.gms.internal.zzahh.zza(Unknown Source)
at com.google.android.gms.internal.zzajh.zzctc(Unknown Source)
at com.google.android.gms.internal.zzajk$1.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5930)
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:1405)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)

Users with the same issue

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

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.