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

  1. ,

    Create an empty public constructor in your code.

Solutions on the web

via Stack Overflow by Jayson
, 1 year ago
Unable to instantiate activity ComponentInfo{com.google.alarmclock/com.google.alarmclock.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
via Stack Overflow by KrownScripter
, 2 years ago
Unable to instantiate activity ComponentInfo{com.example.frederik.snapsule/com.example.frederik.snapsule.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
via Stack Overflow by felipe218
, 2 years ago
Unable to instantiate activity ComponentInfo{com.example.felipe.myappproject/com.example.felipe.myappproject.NewProfileActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
via Stack Overflow by no_ideaw
, 10 months ago
Unable to instantiate activity ComponentInfo{ir.noideaw.instafeed/ir.noideaw.instafeed.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
via Stack Overflow by HellJosun
, 7 months ago
Unable to instantiate activity ComponentInfo{com.example.ggavi.myapplication/com.example.ggavi.myapplication.MapsActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.google.alarmclock/com.google.alarmclock.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2548) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)