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


Solutions on the web

Solution icon of github
via GitHub by grote
, 1 year ago
Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference

Solution icon of github
via GitHub by lkwjohn
, 1 year ago
Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference

Solution icon of github
Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference

Solution icon of stackoverflow
Attempt to invoke virtual method java.lang.String android.content.Context.getPackageName() on a null object reference

Solution icon of stackoverflow
via Stack Overflow by hipkiss
, 1 year ago
Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference

Solution icon of stackoverflow
Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference

Solution icon of stackoverflow
Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference

Solution icon of stackoverflow
Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference

Solution icon of stackoverflow
Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference

Solution icon of web
Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference

Stack trace

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
	at android.content.ComponentName.<init>(ComponentName.java:128)
	at android.content.Intent.<init>(Intent.java:4653)
	at de.grobox.liberario.fragments.DirectionsFragment.onTripRetrieved(DirectionsFragment.java:297)
	at de.grobox.liberario.tasks.AsyncQueryTripsTask.onPostExecute(AsyncQueryTripsTask.java:152)
	at de.grobox.liberario.tasks.AsyncQueryTripsTask.onPostExecute(AsyncQueryTripsTask.java:42)
	at android.os.AsyncTask.finish(AsyncTask.java:651)

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

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
2 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
11 more bugmates