java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.stins.calculator/com.example.stins.calculator.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.widget.TextView.getContext()' on a null object reference

tip
Do you find the tips below useful? Click on the to mark them and say thanks to poroszd . Or join the community to write better ones.
  1. 0

    Android Calculator App Crashing immediately when run

    Stack Overflow | 2 months ago | Kortney Stinson
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.stins.calculator/com.example.stins.calculator.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.widget.TextView.getContext()' on a null object reference
  2. 0

    Immediate program crash on Android diary app

    Stack Overflow | 1 month ago | Kortney Stinson
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.stins.personaldiary/com.example.stins.personaldiary.CreateAccountActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
  3. 0
    samebug tip
    The resource was accessed after it was dismissed.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    NullPointerException after orientation change

    Stack Overflow | 6 months ago | stanna
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.strahinja.popularmoviesp2/com.example.strahinja.popularmoviesp2.activity.MovieListActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.view.ViewGroup.getContext()' on a null object reference
  6. 0

    icons in tabs app crashes upon launching spannable string

    Stack Overflow | 1 month ago | Peter
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.android.miwok/com.example.android.miwok.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference

  1. Indri Yunita 7 times, last 2 months ago
  2. andreeaa marin 184 times, last 3 months ago
  3. Reich 59 times, last 3 months ago
  4. gamebusterz 42 times, last 1 month ago
  5. Emrah Küçük 3 times, last 4 months ago
42 more registered users
14 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.RuntimeException

    Unable to start activity ComponentInfo{com.example.stins.calculator/com.example.stins.calculator.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.widget.TextView.getContext()' on a null object reference

    at android.app.ActivityThread.performLaunchActivity()
  2. Android Platform
    ActivityThread.handleLaunchActivity
    1. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
    2. android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
    2 frames