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

Stack Overflow | 3dDi92 | 2 years ago
  1. 0

    Android: Call Method from another Class which starts a new Intent

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

    Automated exception search integrated into your IDE

  5. 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
  6. 0

    Android App crashed when moving from one activity to another

    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

  1. balajivaishnav 2 times, last 8 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.ContextWrapper.getPackageName()
  2. Android Platform
    Intent.<init>
    1. android.content.ContextWrapper.getPackageName(ContextWrapper.java:131)
    2. android.content.ComponentName.<init>(ComponentName.java:77)
    3. android.content.Intent.<init>(Intent.java:4011)
    3 frames
  3. com.example.project
    JSON_Factory_Test.onPostExecute
    1. com.example.project.main.Login_Activity.LoginSuccess(Login_Activity.java:138)
    2. com.example.project.json.JSON_Factory_Return_Handler.JSON_Factory_Retrun(JSON_Factory_Return_Handler.java:27)
    3. com.example.project.json.JSON_Factory_Test.onPostExecute(JSON_Factory_Test.java:49)
    4. com.example.project.json.JSON_Factory_Test.onPostExecute(JSON_Factory_Test.java:1)
    4 frames
  4. Android Platform
    ActivityThread.main
    1. android.os.AsyncTask.finish(AsyncTask.java:632)
    2. android.os.AsyncTask.access$600(AsyncTask.java:177)
    3. android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645)
    4. android.os.Handler.dispatchMessage(Handler.java:102)
    5. android.os.Looper.loop(Looper.java:135)
    6. android.app.ActivityThread.main(ActivityThread.java:5070)
    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:836)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:631)
    2 frames