ActivityManager: Warning: Activity not started, its current task has been brought to the front
2012-03-29 11:11
543 查看
在一个工程里面只修改了main.xml后,按下快捷键ctrol+F11运行,结果不知为什么提示如下:
ActivityManager: Warning: Activity not started, its current task has been brought to the front
上网查了一下,有如下解决方法:(来源http://blog.csdn.net/timchen6824/article/details/6205435)
今天开始学习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的版本
后面的评论:
也就是在修改了代码后,在没有重新编译这步, 模拟器原来的.apk就不会经过卸载跟重新安装这一步;所以当在eclipse中只是点击运行时,由于现在的程序没有经过编译这一步,所以安装的程序跟原来的一样, 所以在console输出的信息中会出现这一行信息:
根据以上内容再经过几次不同操作的测试,
主要原因还是当前Tab页为main.xml,在按下ctrl+F11时没能正确重新编译,
解决方法除了上面说的之外,关掉main.out.xml并删除此文件,选project----->clean,再选中xxxxxActivity.java为当前Tab页,再ctrl+F11即可正常运行。
ActivityManager: Warning: Activity not started, its current task has been brought to the front
上网查了一下,有如下解决方法:(来源http://blog.csdn.net/timchen6824/article/details/6205435)
今天开始学习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的版本
后面的评论:
也就是在修改了代码后,在没有重新编译这步, 模拟器原来的.apk就不会经过卸载跟重新安装这一步;所以当在eclipse中只是点击运行时,由于现在的程序没有经过编译这一步,所以安装的程序跟原来的一样, 所以在console输出的信息中会出现这一行信息:
根据以上内容再经过几次不同操作的测试,
主要原因还是当前Tab页为main.xml,在按下ctrl+F11时没能正确重新编译,
解决方法除了上面说的之外,关掉main.out.xml并删除此文件,选project----->clean,再选中xxxxxActivity.java为当前Tab页,再ctrl+F11即可正常运行。
相关文章推荐
- ActivityManager: Warning: Activity not started, its current task has been brought to the front
- ActivityManager: Warning: Activity not started, its current task has been brought to the front
- ActivityManager: Warning: Activity not started, its current task has been brought to the front 的的问题
- ActivityManager: Warning: Activity not started, its current task has been brought to the front
- ActivityManager: Warning: Activity not started, its current task has been brought to the front 的的问题
- ActivityManager: Warning: Activity not started, its current task has been brought to the front 的的问题
- ActivityManager: Warning: Activity not started, its current task has been brought to the front 的的问题
- ActivityManager: Warning: Activity not started, its current task has been brought to the front 的的问题
- ActivityManager: Warning: Activity not started, its current task has been brought to the front
- ActivityManager: Warning: Activity not started, its current task has been brought to the front
- ActivityManager: Warning: Activity not started, its current task has been brought to the front
- ActivityManager: Warning: Activity not started, its current task has been brought to the front
- ActivityManager: Warning: Activity not started, its current task has been brought to the front
- ActivityManager: Warning: Activity not started, its current task has been brought to the front 的的问题
- ActivityManager: Warning: Activity not started, its current task has been brought to the front 的的问题
- 问题: ActivityManager: Warning: Activity not started, its current task has been brought to the front
- ActivityManager: Warning: Activity not started, its current task has been brought to the front
- ActivityManager: Warning: Activity not started, its current task has been brought to the front
- ActivityManager: Warning: Activity not started, its current task has been brought to the front
- ActivityManager: Warning: Activity not started, its current task has been brought to the front