RuntimeException: Can't create handler inside thread that has not called Looper.prepare()

£可爱£侵袭症+ 提交于 2019-12-02 11:28:18

As the stack trace tells you, your problem originates from line 29 of Parser.java, in the Parser initializers. You will note that this is not the source code you included here, which is for LoadNews.

Based on the preceding line of the stack trace, either:

  • Parser inherits from Activity

  • Parser is trying to instantiate an Activity

Neither of those is possible.

Maybe instantiate Parser outside LoadNews class and pass reference to it?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!