gpt4 book ai didi

android - 在 notifyDataSetChanged() 上的 WinDeath

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:05:42 26 4
gpt4 key购买 nike

您好,我有以下问题:

data.clear();
data.addAll(datasource.getFilesInFolder()); //gets the data from Sqlite database
adapter.notifyDataSetChanged();

生成此 logCat 输出:

 12-19 14:34:30.864: W/Binder(986): Caught a RuntimeException from the binder stub implementation.
12-19 14:34:30.864: W/Binder(986): java.lang.NullPointerException
12-19 14:34:30.864: W/Binder(986): at android.inputmethodservice.IInputMethodWrapper.setSessionEnabled(IInputMethodWrapper.java:280)
12-19 14:34:30.864: W/Binder(986): at com.android.internal.view.IInputMethod$Stub.onTransact(IInputMethod.java:129)
12-19 14:34:30.864: W/Binder(986): at android.os.Binder.execTransact(Binder.java:404)
12-19 14:34:30.864: W/Binder(986): at dalvik.system.NativeStart.run(Native Method)
12-19 14:34:30.864: W/InputMethodManagerService(757): Got RemoteException sending setActive(false) notification to pid 30040 uid 10174

此异常导致 WIN DEATH...

好吧,我意识到也许它是相反的,WIN DEATH 导致了这个日志输出,因为在日志中 WINDEATH 出现在这之前,那么我不知道为什么会发生 windeath。

我的适配器是扩展的 BaseAdapter,没有什么特别之处。非常奇怪的是以下内容:

提到的代码 fragment 在一个自定义监听器中,该监听器由另一个类触发。当我将有问题的部分放在监听器之外时,它运行良好。

Caught a RuntimeException from the binder stub implementation 是什么意思?这可能是数据库的问题吗?或者也许是我的自定义监听器?任何人都知道出了什么问题吗?

最佳答案

在执行并发操作时,我已经看到了出现此问题的各种问题。参见例如 this thread ( throw +服务)和this one (从 2 个线程在 Canvas 上绘图)。

您说的是不同类中的自定义监听器,是否您也在同时做几件事?

关于android - 在 notifyDataSetChanged() 上的 WinDeath,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20683255/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com