java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.amir_p.bottomnavigation3/com.example.amir_p.bottomnavigation3.MainActivity}: 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

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via Stack Overflow by Amir_P
, 1 year ago
Unable to start activity ComponentInfo{com.example.amir_p.bottomnavigation3/com.example.amir_p.bottomnavigation3.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
via Stack Overflow by Peter
, 8 months ago
Unable to start activity ComponentInfo{com.example.android.miwok/com.example.android.miwok.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
via Stack Overflow by LoveCoding
, 7 months ago
Unable to start activity ComponentInfo{com.example.zeus.jsonstackoverflow/com.example.zeus.jsonstackoverflow.FirstActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
via Stack Overflow by Squishy47
, 1 year ago
Unable to start activity ComponentInfo{com.example.sam.myfirstapp/com.example.sam.myfirstapp.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
via Stack Overflow by Sagar Rawal
, 4 months ago
Unable to start activity ComponentInfo{com.example.sagar.cdproutine/com.example.sagar.cdproutine.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
via Stack Overflow by THEROFLBOAT
, 1 year ago
Unable to start activity ComponentInfo{com.example.roland.scramblegame/com.example.roland.scramblegame.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.amir_p.bottomnavigation3/com.example.amir_p.bottomnavigation3.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2450)

Users with the same issue

12 times, 11 months ago
Samebug visitor profile picture
Unknown user
Once, 10 months ago
9 times, 11 months ago
777 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 10 months ago

Write tip

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