2019独角兽企业重金招聘Python工程师标准>>>

Activity not started, its current task has been brought to the front的解决办法
2011-05-08 19:36

在编译NDK程序时,由于修改了一下C++代码,用Cygwin重新编译后,然后在eclipse中运行程序时, console输出界面显示

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

这时候发现模拟器上显示的内容还是原来的;

对于这个问题具体原因还不是很清楚,但在调式的时候发现,这样做可以解决这个问题;首先在Package Explorer中找到要运行的程序,然后点击右键,选中 refresh, 然后再选中run as -----> android application,最后解决了问题;

对比没有经过 refresh 和 经过 refresh 这步, 观察console输出时,发现两者有不同的部分

以下是经过 refresh 这步在console输出的信息

[2011-05-08 19:13:11 - HelloWjr] Android Launch!
[2011-05-08 19:13:11 - HelloWjr] adb is running normally.
[2011-05-08 19:13:11 - HelloWjr] Performing com.wjr.hellowjr.HelloWjr activity launch
[2011-05-08 19:13:11 - HelloWjr] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'android2.2'
[2011-05-08 19:13:11 - HelloWjr] Uploading HelloWjr.apk onto device 'emulator-5554'
[2011-05-08 19:13:11 - HelloWjr]Installing HelloWjr.apk...
[2011-05-08 19:13:17 - HelloWjr]Success!
[2011-05-08 19:13:17 - HelloWjr] Starting activity com.wjr.hellowjr.HelloWjr on device emulator-5554
[2011-05-08 19:13:20 - HelloWjr] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.wjr.hellowjr/.HelloWjr }

以下是没有经过 refresh 这步在console输出的信息

[2011-05-08 19:12:55 - HelloWjr] Android Launch!
[2011-05-08 19:12:55 - HelloWjr] adb is running normally.
[2011-05-08 19:12:55 - HelloWjr] Performing com.wjr.hellowjr.HelloWjr activity launch
[2011-05-08 19:12:55 - HelloWjr] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'android2.2'
[2011-05-08 19:12:57 - HelloWjr]Application already deployed. No need to reinstall.
[2011-05-08 19:12:57 - HelloWjr] Starting activity com.wjr.hellowjr.HelloWjr on device emulator-5554
[2011-05-08 19:12:59 - HelloWjr] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.wjr.hellowjr/.HelloWjr }
[2011-05-08 19:13:00 - HelloWjr] ActivityManager: Warning: Activity not started, its current task has been brought to the front

在网上找到比较靠谱的解释:Are you getting the warning when you start the app? If you run an app from eclipse without it having to recompile (ie no code changes), it doesn't go through the uninstall-install process, it just pushes the application to the front just like you would if you resumed it from the phone. It's not an error but a 'working as intended'!

也就是在修改了代码后,在没有重新编译这步, 模拟器原来的.apk就不会经过卸载跟重新安装这一步;所以当在eclipse中只是点击运行时,由于现在的程序没有经过编译这一步,所以安装的程序跟原来的一样, 所以在console输出的信息中会出现这一行信息:

转载于:https://my.oschina.net/gavinjin/blog/53540

ActivityManager: Warning: Activity not started,...相关推荐

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

    Android项目在虚拟机上重新运行时出现: ActivityManager: Warning: Activity not started, its current task has been bro ...

  2. Android异常总结---ActivityManager: Warning: Activity not started,its current task has been brought to th

    2.[2013-03-20 22:28:19 - News] ActivityManager: Warning: Activity not started, its current task has ...

  3. Android异常总结---ActivityManager: Warning: Activity not started, its current task has been brought to

    4.运行的时候出现的问题:   在运行Android程序时,有时提示如下,表面程序无法运行.    ActivityManager: Warning: Activity not started, it ...

  4. 出现错误ActivityManager: Warning: Activity not started

    1.在学习两个Activity的切换时,重新把新的工程部署上模拟器时候出现错误:ActivityManager: Warning: Activity not started, its current ...

  5. 关于只有两行报错的闪退( E/ActivityManager: Found activity ActivityRecord)

    关于只有两行报错的闪退 有点仓促,不过发现了新的报错.就把首条博客写了. 环境 Android Studio 2.3.3 Java1.8 对应开发版本是Android 7.0 12-21 21:27: ...

  6. 遇到问题描述:Android Please ensure that adb is correctly located at问题解决

    遇到问题描述: 运行android程序控制台输出 [2013-11-04 16:18:26 - ] The connection to adb is down, and a severe error ...

  7. Android 开发常见错误

    大家都在为项目开发成功而喜悦,但可不知成功的路上是会经常出错的,下面是我碰到的一些错误集合! [错误信息] [2011-01-19 16:39:10 - ApiDemos] WARNING: Appl ...

  8. Android常见的错误及解决

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

  9. Android中出现的各种错误

    [错误信息] [2011-01-19 16:39:10 - ApiDemos] WARNING: Application does not specify an API level requireme ...

  10. Telephone dialer

    运行电话拨号器,需要加这个权限,否则不会打通电话.这个权限是用户权限,是谷歌工程师为了跟自己撇清关系,用户需要权限的时候自己加. 运行android程序的时候提示:ActivityManager: W ...

最新文章

  1. 某程序员吐槽:31岁小姐姐拒绝条件优越的大厂程序员,只因身高不足163cm,难道矮是原罪?...
  2. Altium Designer 隐藏铺铜
  3. linux awk 获取最后一列 获取倒数第二列
  4. oracle撤销管理的方法,Oracle9i中利用自动撤销管理的优点
  5. Access导入文本文件的Schema.ini文件格式
  6. 基于JAVA+SpringMVC+MYSQL的家政服务平台
  7. 新人学习web前端必须要知道的基础知识,让你轻松入门
  8. c语言中的函数可变参数列表相关的三个宏
  9. JS iframe 跨域
  10. Spring事务管理—aop pointcut expression解析
  11. 医学DICOM文件解析(笔记整理)
  12. case when的几种用法
  13. 使用frida/xposed对某灰色APP进行暴力破解
  14. 可爱女人,等你下课——CDN美人串烧
  15. matlab相反数计数,怎么把origin表格中的数改成相反数
  16. 【v-charts】折线图
  17. fcpx绘制遮罩_FCPX插件6组画面冻结定帧静止转场介绍效果 Freeze Frame Transitions【资源分享1542】...
  18. 写给大家看的设计书阅读笔记1——设计的四大基本原则
  19. Ant Design 台湾TW地区二级联动 数据
  20. 简单的APP与PLC通讯

热门文章

  1. 失焦事件触发_JavaScript event 事件详解
  2. android http请求缓存,android 缓存http请求数据
  3. java安卓开发异步任务_Android笔记4-android之多线程和异步任务
  4. SIP Servlet开发环境配置
  5. SQlite数据库的C编程接口(四) 绑定参数(Bound Parameters) ——《Using SQlite》读书笔记
  6. Linux内存管理之页面回收
  7. Linux串口终端驱动——S3C6410平台
  8. Linux串口(serial、uart)驱动程序设计
  9. org.apache.hadoop.fs.ChecksumException: Checksum error
  10. 苏大计算机技术招生人数,苏大省内招生计划比去年增加86名