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

Stack Overflow | MoHaKa | 5 months ago
  1. 0

    Starting an activity from fragment causes NullPointerException

    Stack Overflow | 5 months ago | MoHaKa
    java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
  2. 0

    GitHub comment 345#190650052

    GitHub | 9 months ago | lkwjohn
    java.lang.RuntimeException: Unable to create service sg.edu.smu.livelabs.conferenceapp.BeaconServiceTest: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
  3. 0

    Intent is not working in my RecyclerView

    Stack Overflow | 2 years ago
    java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    NullPointerException on context.getPackageName when creating Intent

    Stack Overflow | 2 years ago
    java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
  6. 0

    android.content.Context.getPackageName()' on a null object reference

    Stack Overflow | 2 years ago | Karthikeyan Ve
    java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference

  1. balajivaishnav 2 times, last 9 months ago
12 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. 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>()
  2. Android Platform
    Intent.<init>
    1. android.content.ComponentName.<init>(ComponentName.java:77)
    2. android.content.Intent.<init>(Intent.java:4618)
    2 frames
  3. com.swazer.smares
    InfoFragment$1.onClick
    1. com.swazer.smares.ui.fragments.InfoFragment$1.onClick(InfoFragment.java:128)
    1 frame
  4. Android Platform
    ActivityThread.main
    1. android.view.View.performClick(View.java:5217)
    2. android.view.View$PerformClick.run(View.java:20983)
    3. android.os.Handler.handleCallback(Handler.java:739)
    4. android.os.Handler.dispatchMessage(Handler.java:95)
    5. android.os.Looper.loop(Looper.java:145)
    6. android.app.ActivityThread.main(ActivityThread.java:6117)
    6 frames
  5. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invoke(Native Method)
    2. java.lang.reflect.Method.invoke(Method.java:372)
    2 frames
  6. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
    2 frames