The activity did not start, its current task was moved to the forefront

I have a very simple Android project. I got the following error when I try to run it. The emulator works, but the application does not appear. I did not find any useful information online. Can anybody help me?

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

 public class Profile extends Activity { /*Button button1; CheckBox check1, check2; EditText text1;*/ /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } } 

 <EditText android:text="@+id/EditText01" android:id="@+id/EditText01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:enabled="false"></ EditText><CheckBox android:text="@+id/CheckBox03" android:id="@+id/ CheckBox03" android:layout_width="fill_parent" android:layout_height="wrap_content"> </CheckBox> <CheckBox android:text="@+id/CheckBox02" android:id="@+id/CheckBox02" android:layout_width="fill_parent" android:layout_height="wrap_content"> </CheckBox> <CheckBox android:text="@+id/CheckBox01" android:id="@+id/CheckBox01" android:layout_width="fill_parent" android:layout_height="wrap_content" android:checked="true"> </CheckBox> </LinearLayout> <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.seiservices.blending" android:versionCode="1" android:versionName="1.0"> <application android:icon="@drawable/icon" android:label="@string/ app_name"> <activity android:name=".Profile" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity> </application> <uses-sdk android:minSdkVersion="8" /> </manifest> 
+63
android
Sep 23 '10 at 17:53
source share
8 answers

This is not an error message, this is a warning. What the system is trying to tell you: the application on the device is the same as your application in Eclipse. And since the application is already running on the device, the system tells you that it is not going to kill and restart it, but brings the activity of your already running application to the forefront. This is pretty normal .; -)

The warning will not continue if you edit your code and run it (because the application will then be killed, reinstalled and launched) or if you kill your process on the phone, for example. through DDMS.

+100
Sep 23 '10 at 18:11
source share

I have seen this before - you want to restart your application, even if you may not have made any code changes. On the emulator, click the "Back" button (to the right of the menu button), and then launch the application, as usual, from Eclipse.

+21
Sep 23 '10 at 21:27
source share

This happens if you start the application from eclipse without recompiling (recompilation will not be performed if you did not change the code), it does not go through the uninstall process, instead it pushes the application to the forefront the same way you launch the application from Home Launcher. This is not a mistake, but "intended work".

Hello

+8
Apr 6 2018-12-12T00:
source share

Project > Clean , and then run your emulator again.

+7
Feb 14 '13 at 16:04
source share

I found that the eclipse somehow fell into a state where it did not create a new apk, even with code changes. Removing apk:

rm./bin/ "YOUR APP NAME" .apk

and restarting the application from eclipse fixes the problem.

+4
Aug 29 2018-12-12T00:
source share

If you receive this warning, it means that you have not changed a single line of your code, and this instance of your project is running on the emulator or on your device. Therefore, if you want to run this again, you can:

1- Make some changes to your code and then compile it again.

2 Or you can easily close the application and then restart it using eclipse or orroid studio or ...

If the problem still persists, try uninstalling the application and starting it again.

+1
09 Oct '14 at 9:34
source share

In the emulator

  • click "Home"
  • Menu button โ†’ scroll through the list and select the application that you are running
  • Click "Force Stop."
0
Apr 15 '12 at 10:11
source share

This is a warning. He says the application is already running. I solved this by recompiling my code, and you can close your emulator and run the application again. Good luck Happy coding

0
Dec 31 '13 at 8:24
source share



All Articles