java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ofekot.socialchat/com.ofekot.socialchat.ChatActivity}: java.lang.NullPointerException

Stack Overflow | Ofek | 6 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

    setAdapter() nullpointerexception

    Stack Overflow | 6 months ago | Ofek
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ofekot.socialchat/com.ofekot.socialchat.ChatActivity}: java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.ofekot.socialchat.MessagesAdapter.getCount()
    2. com.ofekot.socialchat
      MessagesAdapter.getCount
      1. com.ofekot.socialchat.MessagesAdapter.getCount(MessagesAdapter.java:71)
      1 frame
    3. Android Platform
      ListView.setAdapter
      1. android.widget.ListView.setAdapter(ListView.java:480)
      1 frame
    4. com.ofekot.socialchat
      ChatActivity.onCreate
      1. com.ofekot.socialchat.ChatActivity.initialize(ChatActivity.java:66)
      2. com.ofekot.socialchat.ChatActivity.onCreate(ChatActivity.java:45)
      2 frames
    5. Android Platform
      ActivityThread.performLaunchActivity
      1. android.app.Activity.performCreate(Activity.java:5275)
      2. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
      3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2164)
      3 frames