java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.nikhil.amazon1/com.example.nikhil.amazon1.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.EditText.setText(java.lang.CharSequence)' on a null object reference

Stack Overflow | nikhil | 2 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Null Pointer Exception when populating EditText

    Stack Overflow | 2 years ago | nikhil
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.nikhil.amazon1/com.example.nikhil.amazon1.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.EditText.setText(java.lang.CharSequence)' on a null object reference

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'void android.widget.EditText.setText(java.lang.CharSequence)' on a null object reference

      at com.example.nikhil.amazon1.AddTab.receiveURL()
    2. com.example.nikhil
      MainActivity.onCreate
      1. com.example.nikhil.amazon1.AddTab.receiveURL(AddTab.java:122)
      2. com.example.nikhil.amazon1.MainActivity.handleSendText(MainActivity.java:102)
      3. com.example.nikhil.amazon1.MainActivity.onCreate(MainActivity.java:82)
      3 frames
    3. Android Platform
      ActivityThread.performLaunchActivity
      1. android.app.Activity.performCreate(Activity.java:5933)
      2. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
      3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
      3 frames