问题
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