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

Stack Overflow | Dhrupal | 8 months 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

    TextInputLayout nullpointer exception while disabling hint

    Stack Overflow | 8 months ago | Dhrupal
    java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.CharSequence android.widget.EditText.getHint()' on a null object reference

    Root Cause Analysis

    1. java.lang.NullPointerException

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

      at android.support.design.widget.TextInputLayout.setHintEnabled()
    2. android.support.design
      TextInputLayout.setHintEnabled
      1. android.support.design.widget.TextInputLayout.setHintEnabled(TextInputLayout.java:376)
      1 frame
    3. com.test.view
      SelectAlertReviewActivity.onCreate
      1. com.test.view.activity.SelectAlertReviewActivity.createNewTextInputLayout(SelectAlertReviewActivity.java:291)
      2. com.test.view.activity.SelectAlertReviewActivity.initializeGUI(SelectAlertReviewActivity.java:144)
      3. com.test.view.activity.SelectAlertReviewActivity.onCreate(SelectAlertReviewActivity.java:79)
      3 frames
    4. Android Platform
      ActivityThread.handleLaunchActivity
      1. android.app.Activity.performCreate(Activity.java:6221)
      2. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
      3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2611)
      4. android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2723)
      4 frames