Pattern selector

Most relevant patterns first. Most helpful ones displayed. Click here to show all.

  1. Intent.<init>() has thrown a NullPointerException
    Android
    47
    2
    3
  2. ComponentName.<init>() has thrown a NullPointerException
    Android
    49
    2
    3

Your stack trace compared to the selected pattern

Jump to solutionsExpand frames
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
1 matching frame hidden
    at android.content.ComponentName.<init>(ComponentName.java:128)
    at android.content.Intent.<init>(Intent.java:4449)
    at timertesting.kaad.timertesting.SetMyAlarm.sendNotification(SetMyAlarm.java:564)
    at timertesting.kaad.timertesting.SetMyAlarm.acceptNotificationString(SetMyAlarm.java:560)
2 frames hidden

External results for this pattern (10)

  1. Zhuvia Stack Overflow3 months ago
    Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
    Show stack trace
  2. Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
    Show stack trace
  3. 3dDi92via Stack Overflow4 months ago
    Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
    Show stack trace
  4. Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
    Show stack trace
  5. Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
    Show stack trace
  6. Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
    Show stack trace
  7. NCavinsvia Stack Overflow4 months ago
    Unable to instantiate activity ComponentInfo{com.example.geoquizlab1solution/com.example.geoquizlab1solution.SportsQuiz}: java.lang.NullPointerException
    Show stack trace
  8. Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
    Show stack trace
  9. Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
    Show stack trace