If I don't modify source code and compile, I get "Activity not started, its current task has been brought to the front" message. Is there option in Eclipse to force it to run without changing source code?
-
yes just close your application from Emulator or device if Already running then try to run – ρяσѕρєя K Jul 17 '12 at 07:11
-
http://stackoverflow.com/questions/3781182/activity-not-started-its-current-task-has-been-brought-to-the-front – Nermeen Jul 17 '12 at 07:11
-
1clean your project and run again. – Akram Jul 17 '12 at 07:20
-
1This isn't an error or even a compiler warning that indicates you've done anything wrong. I know it says "warning", but it's more like an FYI. As in "FYI, you're running the same code without changes, and that app is already running, so Android will just show you the running app instead of installing the same thing and restarting it." – LuminiousAndroid Jul 17 '12 at 10:21
7 Answers
If u want to enforce it do this. I do this usually though it sounds lame. Add a space anywhere in your code (in any file). Just Save the project and run. It will then go through the uploading and installing process again. This is the easiest way to go about it without actually changing any code that matters.

- 1,945
- 2
- 18
- 40
-
1I do this too, but recently even that hasn't been good enough. It still gives me the warning and doesn't execute the app, not sure what changed. – StackOverflowed Oct 28 '12 at 00:08
why dont u try running it from Emulator again, If you are not modifying source, it will do the same as you mentioned, Either change source(you can add logs, or just do blank enter in any file.) or close it and open it from Emulator.

- 27,299
- 12
- 60
- 71
-->This happens only if there is no change from the previous run of your Application.
-->To Avoid this , You can either::
- Close your Application and then Compile,
- You have to change atleast 1 file of you code and then can Compile it.

- 4,390
- 1
- 34
- 57
There is another way to solve this problem. Run the another app and than run your current app, so you not get this type of error message. And not needed to change the code or adding unnecessary spaces. and it also save your time which can waste to restart the emulator.

- 389
- 7
- 23
If u dont modify the code and want to re-run the code in emulator,the system just throws the warning that the code you are trying to run is already executed.Even i have faced this warning several times.You can do is make some changes in code and try to run again or just finish up all the activities in front and than try to run.It will run successfully.

- 7,868
- 3
- 28
- 43
In my opinion 'Activity not started, its current task...' is really tedious. In some cases I changed nothing in source code, but need to restart because I changed the data

- 1
Clean your project(Menu->Project->Clean) then Run it again.
Works for me.

- 4,532
- 4
- 53
- 64