Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
362 views
in Technique[技术] by (71.8m points)

java - WARN/ActivityManager(78): Launch timeout has expired, giving up wake lock! -> what is this

As the title indicates i get this "error" when running my little app:

WARN/ActivityManager(78): Launch timeout has expired, giving up wake lock!

It came after I added this line to my manifest file:

<uses-permission android:name="android.permission.INTERNET" />

The reason I added that line was to get my app the abillity to connect to a serversocket. Read on another forum that the line would solve my problem (not being able to connect). And well it might have but instead I get that other error.

I'm totally new to android so don't understand much of that android specific stuff going on. Have some Java experience though.

Any help appreciated (:

BTW: not sure if I should have posted some of my code?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This error means your Activity is taking to long to start. If you are doing a lot of processing on the UI thread, Android kills your application. You should use AsyncTask for any processing intensive stuff.

If you could post your code and your SDK version, I can provide more help. There is also another thread on stackoverflow about this. Activity idle timeout for HistoryRecord?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...