java.lang.NullPointerException: package name is null

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 GitHub by kristinaste
, 1 year ago
package name is null
via Stack Overflow by LBJ33
, 1 year ago
Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
via Stack Overflow by ccodes
, 3 months ago
Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
via Stack Overflow by SHIDHIN.T.S
, 2 weeks ago
(), HomeScreenActivity.class); (Line number 338 on LoginFragment.java) Here is the full log I got from on Fabric, Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
via Stack Overflow by Kunal Nikam
, 9 months ago
Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
via Stack Overflow by Ankesh kumar Jaisansaria
, 1 year ago
Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
java.lang.NullPointerException: package name is null
at android.content.ComponentName.(ComponentName.java:99)
at sh.calaba.instrumentationbackend.InstrumentationBackend.setUp(InstrumentationBackend.java:70)
at junit.framework.TestCase.runBare(TestCase.java:132)
at junit.framework.TestResult$1.protect(TestResult.java:115)
at junit.framework.TestResult.runProtected(TestResult.java:133)
at junit.framework.TestResult.run(TestResult.java:118)
at junit.framework.TestCase.run(TestCase.java:124)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176)
at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:555)

Users with the same issue

Once, 3 months ago
2 times, 9 months ago
17 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year 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.