我正在尝试在应用程序中集成“ Freshchat”以提供聊天支持。第一次运行正常,但是当我关闭/杀死该应用程序并再次打开该应用程序时,调用showconversations api后,该应用程序崩溃了。 Freshchat是第三方图书馆。
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.freshchat.consumer.sdk.beans.Channel.getName()' on a null object reference
at com.freshchat.consumer.sdk.a.c.getView(Unknown Source:34)
at android.widget.AbsListView.obtainView(AbsListView.java:2445)
at android.widget.ListView.makeAndAddView(ListView.java:2148)
at android.widget.ListView.fillDown(ListView.java:866)
at android.widget.ListView.fillDown(ListView.java:848)
at android.widget.ListView.fillFromTop(ListView.java:936)
at android.widget.ListView.layoutChildren(ListView.java:1887)
at android.widget.AbsListView.onLayout(AbsListView.java:2244)
at android.view.View.layout(View.java:21031)
at android.view.ViewGroup.layout(ViewGroup.java:6330)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1083)
at android.view.View.layout(View.java:21031)
at android.view.ViewGroup.layout(ViewGroup.java:6330)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:21031)
at android.view.ViewGroup.layout(ViewGroup.java:6330)
at androidx.appcompat.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:446)
at android.view.View.layout(View.java:21031)
at android.view.ViewGroup.layout(ViewGroup.java:6330)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:21031)
at android.view.ViewGroup.layout(ViewGroup.java:6330)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1828)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
at android.view.View.layout(View.java:21031)
at android.view.ViewGroup.layout(ViewGroup.java:6330)
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:899)
at android.view.View.layout(View.java:21031)
at android.view.ViewGroup.layout(ViewGroup.java:6330)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:3359)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2820)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1874)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8108)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1102)
at android.view.Choreographer.doCallbacks(Choreographer.java:909)
at android.view.Choreographer.doFrame(Choreographer.java:836)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1088)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:227)
at android.app.ActivityThread.main(ActivityThread.java:7205)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:575)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:903)