警告/ActivityManager(78):启动超时已过期,放弃唤醒锁! ->这是什么

发布于 2024-12-05 20:16:07 字数 456 浏览 1 评论 0原文

正如标题所示,我在运行我的小应用程序时遇到此“错误”:

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

它是在我将这一行添加到我的清单文件中之后出现的:

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

我添加该行的原因是为了让我的应用程序能够连接到服务器套接字。在另一个论坛上读到该线路可以解决我的问题(无法连接)。好吧,它可能有,但我却得到了另一个错误。

我对 Android 完全陌生,所以不太了解 Android 的具体内容。不过有一些 Java 经验。

感谢任何帮助(:

顺便说一句:不确定我是否应该发布一些代码?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

梦言归人 2024-12-12 20:16:07

此错误意味着您的活动需要很长时间才能启动。如果您在 UI 线程上进行大量处理,Android 会杀死您的应用程序。您应该使用 AsyncTask 来处理任何处理密集型的内容。

如果您可以发布您的代码和 SDK 版本,我可以提供更多帮助。 stackoverflow 上还有另一个关于此的线程。 HistoryRecord 的活动空闲超时?

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?

森林迷了鹿 2024-12-12 20:16:07

我在从服务器中的 php 文件检索结果时遇到了类似的问题。我已经解决了将 php 代码放入 标记中的问题。没有他们,应用程序就挂在那里。

希望有帮助

I had a similar problem retrieving a result from a php file in a server. I had solved putting php code inside <html> tags. Without them the app was hanging there.

Hope it helps

作死小能手 2024-12-12 20:16:07

我也遇到了类似的问题。
在我的 View.dispatchDraw() 中,我调用了一个触发另一个dispatchDraw() 的方法。
(在我的dispatchDraw()中添加一条日志行表明该函数被连续调用。
在 Eclipse 中进行方法分析时没有出现这一点)

希望这对某人有帮助。

I had a similar problem.
Inside my View.dispatchDraw(), I was calling a method that triggered another dispatchDraw().
(Adding a logline inside my dispatchDraw() showed that the function was called continuously.
This did not show up when doing method profiling in Eclipse)

Hope this is helpful to someone.

糖果控 2024-12-12 20:16:07

检查您是否没有打开 2 个或更多 Eclipse IDE(如果这是您选择的 IDE)。其中之一可能会控制 ADB 的部分内容并拒绝其他人的访问。就我而言,我遇到了同样的错误,但是当我关闭所有其他 Eclipse 实例时,应用程序立即以调试模式启动。

Check if you don't have 2 or more Eclipse IDEs open (if that is your IDE of choice). It is possible that one of those is taken control over the parts of the ADB and refusing the others access. In my case, I experienced the same error, but when I closed every other Eclipse instance, the app started in debug mode immediately.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文