ActivityManager: Warning: Activity not started, its current task has been brought to the front

本文探讨了Android项目在虚拟机上运行时出现的ActivityManager: Warning: Activity not started, its current task has been brought to the front提示的原因及解决方法。通过轻微修改代码并重新运行,可以避免该警告提示。
Android项目在虚拟机上重新运行时出现:
ActivityManager: Warning: Activity not started, its current task has been brought to the front

  有时候运行时会有上面的提示,有一个任务已经被欲行。那是什么原因呢,有一个原因就是我们没有改代码再次运行就会有上面的提示,只要我们稍微改动一下,然后保存运行就不会有这个提示了。其他的情况暂时还没有遇到。

5410: 10-28 01:07:28.174171 1671 1759 I ActivityManager: Start proc 8429:com.oplus.persist.multimedia/1000 for restart com.oplus.persist.multimedia 5411: 10-28 01:07:28.174845 1671 1759 W ActivityManager: Slow operation: 7451ms so far, now at startProcess: starting to update pids map 5412: 10-28 01:07:28.184176 1671 1759 W ActivityManager: Slow operation: 7460ms so far, now at startProcess: done updating pids map 5488: 10-28 01:07:33.816895 1671 3310 W ActivityManager: Slow operation: 861ms so far, now at attachApplicationLocked: before bindApplication 5489: 10-28 01:07:33.957125 1671 3310 W ActivityManager: Slow operation: 1002ms so far, now at attachApplicationLocked: immediately before bindApplication 5492: 10-28 01:07:34.222531 1671 3310 W ActivityManager: Slow operation: 1268ms so far, now at attachApplicationLocked: immediately after bindApplication 5493: 10-28 01:07:34.267864 1671 3310 W ActivityManager: Slow operation: 1315ms so far, now at attachApplicationLocked: after updateLruProcessLocked 5498: 10-28 01:07:34.639124 1671 3310 W ActivityManager: Slow operation: 1684ms so far, now at attachApplicationLocked: after updateOomAdjLocked 5499: 10-28 01:07:34.727192 1671 1782 W ActivityManager: pid 1671 system sent binder code 1013 with flags 0 to frozen apps and got error -2 5503: 10-28 01:07:35.218549 1671 3310 W ActivityManager: Slow operation: 525ms so far, now at finishAttachApplicationInner: after dispatching broadcasts 5509: 10-28 01:07:35.925950 1671 3321 W ActivityManager: Slow operation: 149ms so far, now at attachApplicationLocked: before bindApplication 5510: 10-28 01:07:36.083007 1671 3321 W ActivityManager: Slow operation: 308ms so far, now at attachApplicationLocked: immediately before bindApplication 5518: 10-28 01:07:36.906760 1671 3321 W ActivityManager: Slow operation: 1132ms so far, now at attachApplicationLocked: immediately after bindApplication 5519: 10-28 01:07:36.933257 1671 3321 W ActivityManager: Slow operation: 1153ms so far, now at attachApplicationLocked: after updateLruProcessLocked 5520: 10-28 01:07:37.063301 1671 3321 W ActivityManager: Slow operation: 1289ms so far, now at attachApplicationLocked: after updateOomAdjLocked 5521: 10-28 01:07:37.151290 1671 3321 W ActivityManager: Slow operation: 65ms so far, now at finishAttachApplicationInner: after updateOomAdjLocked 5649: 10-28 01:07:52.430314 1671 1671 V ActivityManager: Has totaly same connectionRecord, just reuse it! 5665: 10-28 01:07:53.816368 1671 3310 I ActivityManager: Flag disabled. Ignoring finishAttachApplication from uid: 1000. pid: 8429 5668: 10-28 01:07:54.278782 1671 1671 V ActivityManager: Has totaly same connectionRecord, just reuse it! 5674: 10-28 01:07:55.753697 1671 1671 V ActivityManager: Has totaly same connectionRecord, just reuse it! 5677: 10-28 01:07:59.068096 1671 1687 V ActivityManager: Has totaly same connectionRecord, just reuse it! 5691: 10-28 01:08:01.676895 1671 5628 V ActivityManager: Has totaly same connectionRecord, just reuse it! 5743: 10-28 01:08:12.099764 1671 1758 W ActivityManager: Timeout executing service: ServiceRecord{66f48fb u0 com.oplus.audio.effectcenter/.service.AudioxService c:com.oplus.audio.effectcenter} 5747: 10-28 01:08:13.097544 1671 8596 D ActivityManager: created ANR temporary file:/data/anr/temp_anr_7707674626263381505.txt 5748: 10-28 01:08:13.101164 1671 8596 I ActivityManager: Collecting stacks for pid 8429 into temporary file temp_anr_7707674626263381505.txt 5754: 10-28 01:08:13.843308 1671 8597 I ActivityManager: dumpStackTraces pids=null 5755: 10-28 01:08:14.187037 1671 8597 I ActivityManager: Dumping to /data/anr/anr_8429_2025-10-28-01-08-13-847 5780: 10-28 01:08:23.775358 1671 8596 E ActivityManager: Aborted stack trace dump (current primary pid=8429); deadline exceeded. 5806: 10-28 01:08:26.194795 1671 8597 I ActivityManager: dumpStackTraces nativepids=null 5810: 10-28 01:08:26.210992 1671 8597 I ActivityManager: dumpStackTraces extraPids=null 5811: 10-28 01:08:26.232882 1671 8597 I ActivityManager: Done dumping 5817: 10-28 01:08:28.550083 1671 1753 W ActivityManager: SLOW OOM ADJ: 1116ms for pid 2457 = 500 5880: 10-28 01:08:45.342368 1671 8597 E ActivityManager: ANR in com.oplus.persist.multimedia 这个anr分析一下
11-06
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值