java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.india.chemistry/com.example.india.chemistry.FifthActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.content.Context.getApplicationContext()' on a null object reference

Stack Overflow | Chinmaya KN | 2 months ago
  1. 0

    App crashes when launching another activity

    Stack Overflow | 2 months ago | Chinmaya KN
    java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.india.chemistry/com.example.india.chemistry.FifthActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.content.Context.getApplicationContext()' on a null object reference
  2. 0

    I do not understand how to remove the null pointer exception

    Stack Overflow | 11 months ago | MRJ
    java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.content.Context.getApplicationContext()' on a null object reference
  3. 0

    how to update SharedPreference from other activity?

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

    Automated exception search integrated into your IDE

  5. 0

    Gcm Intent Service get null pointer exeption at Gcm pubsub

    Stack Overflow | 7 months ago | Farhan Afandi
    java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.content.Context.getApplicationContext()' on a null object reference
  6. 0

    Cannot start an Activity because Context "is null"?

    Stack Overflow | 6 months ago | Dan
    java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.content.Context.getApplicationContext()' on a null object reference

  1. Akshay 1 times, last 5 months ago
5 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 'android.content.Context android.content.Context.getApplicationContext()' on a null object reference

    at android.content.ContextWrapper.getApplicationContext()
  2. Android Platform
    ContextWrapper.getApplicationContext
    1. android.content.ContextWrapper.getApplicationContext(ContextWrapper.java:107)
    1 frame
  3. com.example.india
    FifthActivity.<init>
    1. com.example.india.chemistry.FifthActivity.<init>(FifthActivity.java:21)
    1 frame
  4. Java RT
    Class.newInstance
    1. java.lang.Class.newInstance(Native Method)
    1 frame
  5. Android Platform
    ActivityThread.main
    1. android.app.Instrumentation.newActivity(Instrumentation.java:1085)
    2. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2410)
    3. android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2569)
    4. android.app.ActivityThread.access$900(ActivityThread.java:150)
    5. android.app.ActivityThread$H.handleMessage(ActivityThread.java:1399)
    6. android.os.Handler.dispatchMessage(Handler.java:102)
    7. android.os.Looper.loop(Looper.java:168)
    8. android.app.ActivityThread.main(ActivityThread.java:5885)
    8 frames
  6. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invoke(Native Method)
    1 frame
  7. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:797)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:687)
    2 frames