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 问题解决
1518 0
|
Java 应用服务中间件 容器
Tomcat报错 严重: A child container failed during start
Tomcat报错 严重: A child container failed during start
194 0
|
Java Spring
Redisson BUG: Failed to submit a listener notification task. Event loop shut down?
Redisson BUG: Failed to submit a listener notification task. Event loop shut down?
1451 0
|
Java 容器
严重: A child container failed during start
严重: A child container failed during start
178 0
严重: A child container failed during start
|
Java Maven 容器
A child container failed during start
A child container failed during start
152 0
A child container failed during start
|
网络安全 开发工具
【解决方案】A session ended very soon after starting. Check that the command in profile “XXX” is correct.
【解决方案】A session ended very soon after starting. Check that the command in profile “XXX” is correct.
1104 0
【解决方案】A session ended very soon after starting. Check that the command in profile “XXX” is correct.
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(完美解决)
429 0
Error:svn:E155037:Previous operation has not finished; run ‘cleanup‘ if it was interrupted(完美解决)
|
关系型数据库 Shell 网络安全
|
网络协议 Java 容器
【报错】项目启动,仅仅报错 One or more listeners failed to start. Full details will be found in the appropriate container log file
今天spring4.3.13 项目,整合ActiveMQ的时候,项目启动在自动部署到tomcat下的时候,不能正常的部署,仅仅报错如下: Connected to server [2017-12-08 03:57:12,428] Artifact springDemo:war exploded: Artifact is being deployed, please wait.
6339 0