开机启动service,Scheduling restart of crashed service

fanhoucheng 2011-04-06 02:33:44
我在Log里看到SSLService已经启动,但是启动了一会儿5秒左右,日志突然打印以下内容后服务就不再运行了,哪位高手知道啊,跪求解答!!(*******是我的包名)
04-06 06:30:15.653: DEBUG/PackageManager(52): Services: *******.SSLService
04-06 06:30:15.653: DEBUG/PackageManager(52): Receivers: *******.SSLReceiver
04-06 06:30:15.662: DEBUG/PackageManager(52): Activities: *******.Splash *******.activity.SchedulerActivity *******.TaskEditActivity
04-06 06:30:15.672: DEBUG/ActivityManager(52): Uninstalling process *******
04-06 06:30:15.682: DEBUG/ActivityManager(52): Force removing process ProcessRecord{43d53568 215:*******/10030} (*******r/10030)
04-06 06:30:15.692: WARN/ActivityManager(52): Scheduling restart of crashed service *******r/.reciever.SSLService in 5000ms
...全文
2377 10 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
hai046 2012-02-15
  • 打赏
  • 举报
回复
qiejie
mrAking 2011-11-23
  • 打赏
  • 举报
回复
我们这也出现了这种问题。很显然,或者是很可能吧,系统资源不够,service 被回收了,我都折腾了2天了。由于项目需求和规划,也不好乱改。光服务就5个了。出现问题也猜测到了。
Scheduling restart of crashed service


11-** 13:10:45.043 D/wfm-debug( 390): BaseActivity --- logout() starts...
11-** 13:10:45.133 I/Process ( 390): Sending signal. PID: 390 SIG: 9
11-** 13:10:45.153 I/ActivityManager( 76): Process com.huawei.******.mobile.client (pid 390) has died.
11-** 13:10:45.153 W/ActivityManager( 76): Scheduling restart of crashed service com.huawei.******.mobile.client/.service.Task******Service in 5000ms
11-** 13:10:45.153 W/ActivityManager( 76): Scheduling restart of crashed service com.huawei.******.mobile.client/.service.A***Service in 14997ms
11-** 13:10:45.153 W/ActivityManager( 76): Scheduling restart of crashed service com.huawei.******.mobile.client/.service.Ga******Service in 24997ms
11-** 13:10:45.153 W/ActivityManager( 76): Scheduling restart of crashed service com.huawei.******.mobile.client/.service.Re*****gService in 34996ms
11-** 13:10:45.153 W/ActivityManager( 76): Scheduling restart of crashed service com.huawei.******.mobile.client/.service.Se****Service in 44995ms
11-** 13:10:45.183 I/WindowManager( 76): WIN DEATH: Window{44f6b970 com.huawei.******.mobile.client/com.huawei.******.mobile.client.activity.Tas***Activity paused=true}
11-** 13:10:45.183 I/WindowManager( 76): WIN DEATH: Window{450e7c10 AtchDlg:com.huawei.******.mobile.client/com.huawei.******.mobile.client.activity.Ta***tActivity paused=false}
11-** 13:10:45.203 W/InputManagerService( 76): Got RemoteException sending setActive(false) notification to pid 390 uid 10032
11-** 13:10:45.352 W/WindowManager( 76): Rebuild removed 2 windows but added 1
11-** 13:10:50.223 I/ActivityManager( 76): Start proc com.huawei.******.mobile.client for service com.huawei.******.mobile.client/.service.Ta*****ifyService: pid=520 uid=10032 gids={1006, 3003, 1015, 1007}
11-** 13:10:50.473 D/wfm-debug( 520): WFMApplication --- onCreate() starts...
11-** 13:10:50.503 D/wfm-debug( 520): WFMApplication --- onCreate() ends...
芸芸芸芸 2011-04-07
  • 打赏
  • 举报
回复
没搞懂什么情况
prince58 2011-04-07
  • 打赏
  • 举报
回复
BroadcastReceiver里面的操作最好不要太耗时!一般要在10秒以内。你检查看是不是这个原因。
fanhoucheng 2011-04-07
  • 打赏
  • 举报
回复
如果apk启动好了之后,我在程序中通过某个按钮再启动这个service,却能正常启动,没人懂吗?!
yongyuandeni 2011-04-07
  • 打赏
  • 举报
回复
把你代码贴出来大家帮你看看问题
majaw 2011-04-07
  • 打赏
  • 举报
回复
把整个源码都找了遍也没找到你的LOG
04-06 06:30:15.672: DEBUG/ActivityManager(52): Uninstalling process *******
fanhoucheng 2011-04-06
  • 打赏
  • 举报
回复
同样的代码,同样的配置,如果我新建一个非常简单的helloworld app,把broadcaster开机启动某个service放里面,就正常
fanhoucheng 2011-04-06
  • 打赏
  • 举报
回复
现在就是要用broadcaster开机启动某个service,定时器有它的局限性,不是什么地方都适合的,比如应用都没有启动怎么能运行?
yousite1 2011-04-06
  • 打赏
  • 举报
回复
你用startService启动的还是?
你要作的是什么事,如果是定时任务可以考虑用定时器实现,这样,不论应用是否关闭依然在运行

80,472

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧