原文:Android開發:Can't create handler inside thread that has not線程問題解決

一 問題如下 報錯內容:Only the original thread that created a view hierarchy can touch its views.Only the original thread that created a view hierarchy can touch its views. 問題分析:在Android中不允許Activity里新啟動的線程訪問該Ac ...

2020-03-24 20:12 0 2688 推薦指數:

查看詳情

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

最近做項目時出現個問題。 在一個基類中,創建一個Handler對象用於主線程向子線程發送數據,代碼如下 但不知道為啥一直報錯:Can't create handler inside thread that has not called Looper.prepare()。 搜索后 ...

Mon Jan 14 00:10:00 CST 2013 3 133790
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM