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




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

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

目录
相关文章
|
6月前
|
Shell 容器 Perl
Back-off restarting failed container 问题解决
Back-off restarting failed container 问题解决
495 0
|
18天前
Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger failed with multiple
Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger failed with multiple
13 1
|
17天前
|
编译器 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.“问题
35 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(完美解决)
291 0
Error:svn:E155037:Previous operation has not finished; run ‘cleanup‘ if it was interrupted(完美解决)
2015-03-18 current note update logic in my task
2015-03-18 current note update logic in my task
70 0
2015-03-18 current note update logic in my task
2015-03-17 current note creation logic in my task
2015-03-17 current note creation logic in my task
86 0
2015-03-17 current note creation logic in my task
why process type for MyOpportunity creation is empty
why process type for MyOpportunity creation is empty
79 0
why process type for MyOpportunity creation is empty