majlindavdylaj / ChatAppTutorial

https://www.youtube.com/koddev
127 stars 97 forks source link

Its always crashing after login In or Signing Up users #16

Open richdiv32 opened 5 years ago

richdiv32 commented 5 years ago

Run LOG:

E/AndroidRuntime: FATAL EXCEPTION: main Process: com.koddev.chatapp, PID: 17898 java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference at com.koddev.chatapp.Adapter.UserAdapter.onBindViewHolder(UserAdapter.java:54) at com.koddev.chatapp.Adapter.UserAdapter.onBindViewHolder(UserAdapter.java:28) at android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:6673) at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:6714) at android.support.v7.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:5647) at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5913) at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5752) at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5748) at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2232) at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1559) at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1519) at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:614) at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3812) at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3529) at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:4082) at android.view.View.layout(View.java:17727) at android.view.ViewGroup.layout(ViewGroup.java:5578) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1079) at android.view.View.layout(View.java:17727) at android.view.ViewGroup.layout(ViewGroup.java:5578) at android.support.v4.view.ViewPager.onLayout(ViewPager.java:1769) at android.view.View.layout(View.java:17727) at android.view.ViewGroup.layout(ViewGroup.java:5578) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1741) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585) at android.widget.LinearLayout.onLayout(LinearLayout.java:1494) at android.view.View.layout(View.java:17727) at android.view.ViewGroup.layout(ViewGroup.java:5578) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:17727) at android.view.ViewGroup.layout(ViewGroup.java:5578) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1741) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585) at android.widget.LinearLayout.onLayout(LinearLayout.java:1494) at android.view.View.layout(View.java:17727) at android.view.ViewGroup.layout(ViewGroup.java:5578) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:17727) at android.view.ViewGroup.layout(ViewGroup.java:5578) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1741) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585) at android.widget.LinearLayout.onLayout(LinearLayout.java:1494) at android.view.View.layout(View.java:17727) at android.view.ViewGroup.layout(ViewGroup.java:5578) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at com.android.internal.policy.DecorView.onLayout(DecorView.java:726) at android.view.View.layout(View.java:17727) at android.view.ViewGroup.layout(ViewGroup.java:5578) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2437) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2126) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1312) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6578) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874) at android.view.Choreographer.doCallbacks(Choreographer.java:686) at android.view.Choreographer.doFrame(Choreographer.java:621) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6165) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:933) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823) I/FirebaseAuth: [FirebaseAuth:] Loading module via FirebaseOptions. [FirebaseAuth:] Preparing to create service connection to gms implementation Process 17898 terminated.

pls what can i do.

MohammedAbidNafi commented 3 years ago

Can you post the code? of your user Adapter and activity code where this error occurs (For Example Main Activity)