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

简介:

在部署一个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没有设置,于是我设置了,重新运行一遍,问题解决



本文转自陈哈哈博客园博客,原文链接http://www.cnblogs.com/kissazi2/archive/2012/01/21/2977157.html如需转载请自行联系原作者

kissazi2
相关文章
|
Shell 容器 Perl
Back-off restarting failed container 问题解决
Back-off restarting failed container 问题解决
1364 0
|
6月前
Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger failed with multiple
Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger failed with multiple
34 1
|
6月前
|
编译器 C语言
成功解决“Run-Time Check Failure #2 - Stack around the variable ‘arr‘ was corrupted.“问题
成功解决“Run-Time Check Failure #2 - Stack around the variable ‘arr‘ was corrupted.“问题
276 1
Error:svn:E155037:Previous operation has not finished; run ‘cleanup‘ if it was interrupted(完美解决)
Error:svn:E155037:Previous operation has not finished; run ‘cleanup‘ if it was interrupted(完美解决)
414 0
Error:svn:E155037:Previous operation has not finished; run ‘cleanup‘ if it was interrupted(完美解决)
|
网络协议
Job for named.service failed because the control process exited with error code.怎么解决
本篇内容记录了如何解决Job for named.service failed because the control process exited with error code.的问题。
3575 0
Job for named.service failed because the control process exited with error code.怎么解决