gpt4 book ai didi

android - 请任何人都可以在 LogCat 中解释这个异常

转载 作者:行者123 更新时间:2023-11-29 18:10:01 25 4
gpt4 key购买 nike

06-28 12:07:10.881: E/(930): {total=21 secs, date2=28-06-2012, time2=9:43:09 AM, time1=9:42:48 AM, date1=28-06-2012}
06-28 12:07:11.131: E/testing(930): exception:android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
06-28 12:07:11.160: E/(930): {total=24 secs, date2=28-06-2012, time2=10:45:02 AM, time1=10:44:38 AM, date1=28-06-2012}
06-28 12:07:11.601: E/testing(930): exception:java.lang.IllegalArgumentException: The observer is null.

最佳答案

  • .ViewRoot$CalledFromWrongThreadException: 只有原始线程创建 View 层次结构的可以触及它的 View

看起来您正在尝试从非 UI 线程更新 UI 元素。

应根据需要使用 HandlerrunOuUIThread Activity 功能或 Asynctask

关于android - 请任何人都可以在 LogCat 中解释这个异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11239263/

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