java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ranatalha.realtimechat/com.ranatalha.realtimechat.Chat_Room}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Object.toString()' on a null object reference

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

    App Crashing on a specific task. Unable to start Activity : java.lang.NullPointerException

    Stack Overflow | 6 months ago | Rana Talha Tariq
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ranatalha.realtimechat/com.ranatalha.realtimechat.Chat_Room}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Object.toString()' on a null object reference

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'java.lang.String java.lang.Object.toString()' on a null object reference

      at com.ranatalha.realtimechat.Chat_Room.onCreate()
    2. com.ranatalha.realtimechat
      Chat_Room.onCreate
      1. com.ranatalha.realtimechat.Chat_Room.onCreate(Chat_Room.java:40)
      1 frame
    3. Android Platform
      ActivityThread.performLaunchActivity
      1. android.app.Activity.performCreate(Activity.java:6102)
      2. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
      3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2410)
      3 frames