当图标preSS的发射装置应用完全重新启动 [英] App completely restarting when launched by icon press in launcher

查看:129
本文介绍了当图标preSS的发射装置应用完全重新启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在试图让我的第一个Android应用程序的发布版本发送到少数测试者的过程。然而,我遇到了与它的问题。当您退出应用程序,然后通过图标启动它重新输入一遍,将重新启动,而不是返回到它的整个应用程序的previous位置。出现这种情况,即使你退出之后重新输入。然而,这并不重要,如果我按住Home键,通过最近的应用程序列表中启动它发生了。

I'm in the process of trying to make a release build of my first android app to send to a few testers. However, I ran into a problem with it. When you exit the app and then re-enter it by launching it via its icon, it restarts the whole app instead of returning to it's previous location. This occurs even if you re-enter right after exiting. However, it does not happen if I hold the Home button and launch it through the recent apps list.

我在网上搜索别人有这个问题,有一些,但从来没有人有一个坚实的答案,为什么它的发生给他们。它被建议老问题设置launchmode为singletask或singleinstance清单文件,但是这并没有帮助我,再说 - 从我个人理解,为Android的默认行为是返回到previous状态在这种情况下的任务,所以我不知道为什么我会需要特别明显的选择,使之做到这一点。

I've searched online for others having this problem and there are a few, but no one has ever had a solid answer as to why it's happening to them. It's been suggested in old questions to set the launchmode to singletask or singleinstance in the manifest file, but that hasn't helped me, and besides - from what I understand, the default behavior for android is to return to the previous state of the task in this situation, so I don't know why I would need special manifest options to make it do that.

有关此问题的最离奇的是,如果我使用Eclipse和调试器把我的手机上的应用程序,不会出现此问题。我甚至都不需要连接到调试器,好像只要我有应用程序的调试版本,不会出现问题。但是,如果我用一个发行版(我创建它采用的是Android工具 - 出口签名在Eclipse应用程序包的菜单选项),在问题发生。 如果任何人有任何见解,以什么导致这,我很想听听你的看法。

The most bizarre thing about this problem is that if I use eclipse and the debugger to put the app on my phone, this problem does not occur. I don't even need to be connected to the debugger, it seems like as long as I have a debug version of the app, the problem doesn't occur. But if I use a release version (I create it using the Android Tools - Export Signed Application Package menu option in Eclipse), the problem happens. If anyone has any insight as to what is causing this, I'd love to hear your thoughts.

推荐答案

我有同样的问题与应用程序,我解决了这个行为,增加标志机器人:launchMode =singleTop而不是机器人:launchMode =singleTask。希望这将帮助别人。

I had the same problem with an application and I resolved this behavior adding flag "android:launchMode="singleTop"" instead of "android:launchMode="singleTask"". Hope this will help somebody.

这篇关于当图标preSS的发射装置应用完全重新启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆