java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ListView.Messages/com.ListView.Messages.ChatMainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.EditText.setOnClickListener(android.view.View$OnClickListener)' on a null object reference

Stack Overflow | Ko Vartthan | 5 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

    How to show a date and time picker in the alert dialog in android?

    Stack Overflow | 5 months ago | Ko Vartthan
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ListView.Messages/com.ListView.Messages.ChatMainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.EditText.setOnClickListener(android.view.View$OnClickListener)' on a null object reference

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'void android.widget.EditText.setOnClickListener(android.view.View$OnClickListener)' on a null object reference

      at com.ListView.Messages.ChatMainActivity.setupEvents()
    2. com.ListView.Messages
      ChatMainActivity.onCreate
      1. com.ListView.Messages.ChatMainActivity.setupEvents(ChatMainActivity.java:139)
      2. com.ListView.Messages.ChatMainActivity.onCreate(ChatMainActivity.java:51)
      2 frames
    3. Android Platform
      ActivityThread.performLaunchActivity
      1. android.app.Activity.performCreate(Activity.java:5990)
      2. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
      3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
      3 frames