java.lang.NullPointerException: package name is null


Solutions on the web69

Solution icon of github
via GitHub by kristinaste
, 1 year ago
package name is null

Solution icon of stackoverflow
via Stack Overflow by diiiz_
, 1 year ago
class name is null

Solution icon of stackoverflow
via Stack Overflow by vcapra1
, 1 year ago
class name is null

Solution icon of github
via GitHub by hyb1996-guest
, 4 months ago
class name is null

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

Stack trace

java.lang.NullPointerException: package name is null
	at android.content.ComponentName.<init>(ComponentName.java:99)
	at android.content.Intent.setClassName(Intent.java:7093)
	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)
	at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1879)

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

2 times, 7 months ago
Once, 1 month ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
17 times, 1 year ago
7 more bugmates