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 | 1 week 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
    samebug tip
    The resource was accessed after it was dismissed.
  3. 0

    NullPointerException after orientation change

    Stack Overflow | 4 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
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 11#257222644

    GitHub | 4 months ago | jogrimst
    java.lang.RuntimeException: Unable to start activity ComponentInfo{org.literacyapp.calculator/com.android.calculator2.Calculator}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.android.calculator2.view.MultiButton.setEnabled(int)' on a null object reference
  6. 0

    Android app is crashing. I've tried the obvious solutions not sure where to go from here

    Stack Overflow | 2 months ago | Squishy47
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.sam.myfirstapp/com.example.sam.myfirstapp.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.SharedPreferences android.content.Context.getSharedPreferences(java.lang.String, int)' on a null object reference

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