gal*_*ite 4 android networkonmainthread
我得到一个NetworkOnMainThreadException在我的Service类,它本质上是没有意义的,因为服务是后台进程,据我了解.
在Service方法中,我正在调用静态帮助器方法来下载数据.我也在使用DefaultHttpClient.
这里发生了什么?
onStartCommand()在一个UI线程上运行Service.尝试使用IntentService,或者在Service(Handler/ Runnable,AsyncTask)中使用任何其他线程方法.
| 归档时间: |
|
| 查看次数: |
3355 次 |
| 最近记录: |