Original address: http://blog.csdn.net/leather0906/article/details/6593003
When you run the Android program:ActivityManager:Warning:Activity not started, it current task have been brought to the front
But in the simulator showed the program interface, and then Google a bit,
There was a set of questions and answers that caught my attention:
Hi
I have a very simple Android project. I got the following error message when I try to run it. The emulator is running and the application doesn ' t come up. I couldn ' t find any useful information online. Can anyone help me?
Thanks,
Arning:activity not started, it current task have been brought to the front public class profile extends Activity {/butt On Button1; CheckBox Check1, Check2; EditText text1;/
Reply:
Hi lewis!
It is a error message, it is a warning. What the system was trying to tell you:the application on the device was the same as your application in Eclipse. And because the application is already running on the device, the system tells it's not going to kill and Restar T it, but bring the activity of your already running apps into the foreground. This is pretty normal. ;-)
The warning won't continue if you edit your code and run it (because the app was then killed, reinstalled and started) O R If you kill your process on the phone, e.g via the DDMS.
Explain:
This is not a bug on the Android platform, but Android itself is such a processing mechanism.
We are in the Android platform, by the return button, or the program itself exit operation, to end a process, the actual Android virtual machine may not be the actual end of the process, the memory allows, the program will be cached in the form of Android virtual machine. The Android system cleans up tasks that are not activated for long periods of time and provides memory for other programs only when there is insufficient memory.
Android does this for the next time you start the program more quickly.
Therefore, the appearance of the landlord this situation, is that your program has not changed, and the memory is sufficient, the last executed program, from the cache cached state directly to the top of the task stack, your program can continue to execute.
To eliminate the warning solution:
The program that exits the virtual machine runs again from the new one.
ActivityManager:Warning:Activity not started, it current task have been brought to the front problem