java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.sharath.imageapp/com.example.sharath.imageapp.Imagelist}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference

Stack Overflow | Jacksparrow | 9 months ago
  1. 0

    nullPointerException with static context

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

    java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()'

    Stack Overflow | 9 months ago | Jacksparrow
    java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.sharath.imageapp/com.example.sharath.imageapp.Imagelist}: 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.ContextWrapper.getPackageName()
  2. Android Platform
    Intent.<init>
    1. android.content.ContextWrapper.getPackageName(ContextWrapper.java:132)
    2. android.content.ComponentName.<init>(ComponentName.java:77)
    3. android.content.Intent.<init>(Intent.java:4161)
    3 frames
  3. com.example.sharath
    Imagelist.<init>
    1. com.example.sharath.imageapp.Imagelist.<init>(Imagelist.java:57)
    1 frame
  4. Java RT
    Class.newInstance
    1. java.lang.reflect.Constructor.newInstance(Native Method)
    2. java.lang.Class.newInstance(Class.java:1606)
    2 frames
  5. Android Platform
    ActivityThread.performLaunchActivity
    1. android.app.Instrumentation.newActivity(Instrumentation.java:1066)
    2. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2280)
    2 frames