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

本文详细介绍了在部署Android应用过程中遇到的问题及解决方案,包括活动未启动警告、应用名称冲突及布局文件导致的问题,并提供了具体的解决步骤。

在部署一个HelloAndroid应用后,由于发现要学习的代码需要用2.0以上的sdk。因而又重新建了一个工程。

再重新把新的工程部署上模拟器时候,出现了:

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

而新的应用总是之前的那个应用。

原因是:两个应用起了同样的名字,模拟器总是识别第一个

解决方法是:重新启动一边模拟器;如果还是不行,可以先把模拟器delete掉再重新add就可以了

 

另外:

若是有版本信息警告:

 WARNING: Application does not specify an API level requirement!
 Device API version is 7 (Android 2.1)

在androidMainfest.xml 里的<manifest></manifest>之间的标记符添加 <uses-sdk android:minSdkVersion="7" />这行xml代码就行。其中7表示version2.1的版本

以上内容来自http://blog.163.com/archibald_zsw/blog/static/1723662332010924112538982/



但是实际上我发现:这并不能解决我的问题。我发现用原来的main的布局文件的时候,这个程序就能正常启动。所以问题锁定在布局文件上面。代码的问题,点到Graphical LayOut的时候,发现他提示我有一Layout_Width没有设置,于是我设置了,重新运行一遍,问题解决




作者: kissazi2 
出处: http://www.cnblogs.com/kissazi2/ 
本文版权归作者所有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

转载:http://www.cnblogs.com/kissazi2/archive/2012/01/21/2977157.html

行 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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值