Activity Launch timeout has expired, giving up wake lock! and timeout for HistoryRecord

谁说胖子不能爱 提交于 2020-01-05 08:48:11

问题


I have some warning in my application and i use JSoup concept,my app is working in another system,i can't do that why ?

I am getting following errors

1.03-26 15:11:14.296: WARN/ActivityManager(70): Launch timeout has expired, giving up wake lock!
2.03-26 15:11:14.893: WARN/ActivityManager(70): Activity idle timeout for HistoryRecord{450e4348 com.list/.ListActivity}

3.03-26 15:11:25.831: WARN/System.err(407): java.net.UnknownHostException: Host is unresolved: www.dzone.com:80
and am using api 2.2 level 8emulator in sdk...

回答1:


Just to be safe: Network is enabled in the emulator? F8 toggles it, and you can disable it in the launch configuration.

If you retrive the connection Connection connection = Jsoup.connect(...); instead of using the shortcut Document doc = Jsoup.connect(...).get(); you can set the timeout for the connection before getting the document. Note that the Jsoup API doesn't use getter/setter...

And don't forget to use the protocol part (http or https) in the URL.



来源:https://stackoverflow.com/questions/9869943/activity-launch-timeout-has-expired-giving-up-wake-lock-and-timeout-for-histor

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