java.lang.RuntimeException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • nullPointerException with static context
    via Stack Overflow by Error
    ,
  • Intent is not working in my RecyclerView
    via by Unknown author,
    • 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 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2290) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2442) at android.app.ActivityThread.access$800(ActivityThread.java:156) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1351) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:211) at android.app.ActivityThread.main(ActivityThread.java:5371) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:945) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:740) Caused by: 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(ContextWrapper.java:132) at android.content.ComponentName.<init>(ComponentName.java:77) at android.content.Intent.<init>(Intent.java:4161) at com.example.sharath.imageapp.Imagelist.<init>(Imagelist.java:57) at java.lang.reflect.Constructor.newInstance(Native Method) at java.lang.Class.newInstance(Class.java:1606) at android.app.Instrumentation.newActivity(Instrumentation.java:1066) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2280)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    balajivaishnav
    2 times, last one,
    Unknown visitor1 times, last one,
    10 more bugmates