0进程和1个服务 [英] 0 processes and 1 service

查看:141
本文介绍了0进程和1个服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何想法,为什么我在管理应用程序运行选项卡上看到的,我的应用程序,并以0流程和1服务谷歌地图?我的应用程序已经奄奄一息,但并不完全,它不会重新启动。我试图连接到DDMS看看是怎么回事,但没有过程显示设备(我检查,我的清单有可调试=真)。

Any idea why I see in the manage applications "Running" tab, both my application and google maps with "0 processes and 1 service"? My app has been dying, but not completely and it doesn't restart. I was trying to connect the DDMS to see what is going on, but no processes show for the device (i have checked that my manifest has debuggable="true").

推荐答案

答案是....
服务是不是一个过程,因此它是有效的服务来创建,但尚未启动。如果该服务未启动,则有0的进程。
在我的具体情况,我注意到,日志说哗啦啦服务调度重启。我认为这意味着在onStart()将要被调用,它不是这种情况。这里有两个环节这有助于回答这个问题:

The answer is.... A service is not a process, therefore it is valid for a service to be created, but not started. If the service is not started, then there are 0 processes. In my particular case, i noticed that the logs stated "Scheduling restart of crashed service". I assumed that it meant onStart() was going to be called, which is not the case. Here are two links which helped answer this question:

http://groups.google.com/group/android-developers/browse_thread/thread/a9d3c1acbd46e384#

<一个href=\"http://stackoverflow.com/questions/2398482/scheduling-restart-of-crashed-service-but-no-call-to-onstart-follows\">"Scheduling坠毁的服务与QUOT ;,但在onStart(没有呼叫)的重启如下

这篇关于0进程和1个服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆