It used to be that when I changed a piece of code and ran the project, Eclipse would kill and restart the app on my phone. I'm now getting "Warning: activity not started, its current task has been brought to the front" whenever I try to run regardless if whether I've updated code or not. I have tried deleting and adding entire code segments then running and I'm still getting this. I'm now having to resort to actually manually killing the app on my phone whenever I want to update the code. Any clue as to what is going on?
Update: one thing that I've changed recently is that I've updated HTC sync manager which has the HTC USB drivers and reinstalled Google USB drivers. Could that be the reason?
Normally It happens when you have not changed anything in your code. I had same error on emulator when I am not changing anything and still run the same code.
K looks like that you heavent mentioned you activity in manifest.
See this documentation. Or u could try to reset eclipse to default.
And if it doesn't solves ur problem then please paste the error log here...
Related
About a week ago I cleared logcat with the "clear logcat" button on the top left of the logcat screen. Since then, nothing shows up in logcat.
This may sound like some duplicate question, but I have tried every accepted answer with no change. I need some ideas or solutions. Don't close this saying it's a duplicate please.
I have invalidated caches/restarted.
Restarted Android Studio.
Restarted my phone.
Killed, Restarted, updated the adb.
Restarted computer.
Pressed alt+6 multiple times to restart logcat.
Hit the restart button in the logcat panel. Then changed options like debug/verbose as other solutions say.
I have also checked and rechecked every field in logcat (verbose, no filter, etc) and have tried every possible combination, including the usual "fix" of verbose + no filter. I can't even get logs (Log.i, eg) to show up.
Another solution was to go to Tools>Android>Enable ADB integration. This option no longer exists.
More info: Windows 10, newest version. Android Studio 3.4.2.
Edit: My question is DIFFERENT because NONE of those solutions have worked, as stated originally.
I have also now done a complete clean reinstall of Android Studio and still no working logcat.
Edit 2: So I guess this must be a bug of some kind? No solutions after weeks of trying everything. I'll contact Android support I guess? Hopefully it works out.
Try adding debuggable: "true" to the application tag in manifest. Compile your project now and you'll saw every log in the logcat. Hope it may help you.
My model of ZTE phone does not allow logcat. People have reported the same issue with this phone. So it's the phone and not Android Studio or my app.
I keep getting the message 'Activity not started, its current task has been brought to the front' despite making changes to the code. I wasn't aware of changing any settings in Eclipse besides creating a new AVD and it was working fine earlier today. Now it's not reinstalling at all.
I'm not sure why the problem started when it did but I installed some updates from Eclipse and Android and it seems to be working fine now.
There are several thing that you can do to solve this problem:
You can close your AVD and then start it again.
You can manually uninstall your application using AVD interface (Home - Menu button - Manage apps - All tab - Your app - Force stop/Uninstall).
The solution was to start the task manager and end multiple AVD emulator processes that had somehow built up.
i also constantly have this problem, even when i change the code. what helps for me is simply to start my application in the debug mode; then it starts without that warning. later when i start the application in the non-debugging mode again it normally starts without that warning (at least for a while).
Like the title says, whenever I make any changes in the code I don't see the changes in the AVD. Is there a way to do this without closing the AVD and starting it again?
I'm using Eclipse.
Thanks!
I have noticed this behavior at times as well. In the ADB log it will state something like the activity is already started and has been brought to the front even though it was already on the screen. Not sure what the cause of this behavior is and it seems to happen randomly. I have dealt with this in the past by force stopping the app in the AVD or just uninstalling it. Sometimes pressing the home button on the AVD and then running the APP from eclipse seems to fix this.
After deploying to my device once for debugging, every time I try and "Run As" in regular mode it still attached the debugger. I have deleted the application from the device and it still does this. This causes and issue when I just want to run the app, untethered from my laptop.
Has anyone else ran into this issue? If so, how do you fix it.
Does clicking on the "Disconnect" button do the trick?
Try restarting Eclipse. I had this issue once and restarting Eclipse worked for me.
I have had problems with this as well. I don't recall what specifically fixed the problem, but I remember I did a combination of: 1) changing the configuration to "Run" only, 2) restarting Eclipse, and 3) trying multiple times.
One thing to keep in mind- even in "Run" mode you can see things going on in the debugger. For instance, you still get log messages. The main difference that I see is that it is much faster, and you don't see the threads and variables.
The log tab is visible in DDMS and I have been logging data using Log.v(...) for many a week now without any problems.
Today, the log data is now longer being displayed in the Log window. Worked, then did a programming change to track a bug and now the log data is no longer showing.
Have tried running the app on an external Android phone, on the Android Simulator and it makes no difference.
Have closed down Eclipse, reloaded and still no change.
The console displays activity but only to the point of starting the activity.
The external phone is set up for debugging - not that this could be a problem since I have the same problem with the simulator
It looks like I have inadvertantly set something incorrectly but can't remember changing anything :-(
Anyone come across this problem before - have looked at previous posts but none seem relevant.
Regards,
Oliver
I had the same problem a while back. I was using the emulator and device for debugging. Apparently you have to select the device listed in the DDMS view whose logs you want to see. My logs were blank because the device that I was expecting logs from was not the one selected.
Hope that helps
Tried this:
https://stackoverflow.com/a/9826502/1238317
Check in your logcat window - TOP RIGHT corner PAUSE button || (Pause
receiving new logcat messages)
Few clicks + eventually restart eclipse (usually works in my case)
Check your LogCat window to see if you are filtering and make sure to set the debug level to Verbose.
There are possible reasons and solutions:
LogCat might have to much in cache, clear the log and see if it fixed the issue
You might need to select the device in the device view (even if it is already selected, try to click on it)
adb is not correctly working anymore, try to kill and start it again
Check if you see output if you use the command line adb logcat
Just go to DDMS perspective and click on the device's name in upper left corner and done your log cat will Start with a BOOm :P
In Android Studio, which I have found to be much more reliable and intuitive than Eclipse, I found this to be a common issue. For me what solves it (device is automatically set when running your app) besides checking code, is to Quit and restart the emulator or Quit Android Studio and Emulator and reopen/restart