LogCat for Android Device in Eclipse not showing - android

repeatedly my LogCat in Eclipse seems to stuck.
reproducible when creating/modifying a filter.
switching to DDMS and selecting my device doesn't help as suggested in other answers in stackoverflow.
Only a restart of eclipse helps, but this is not usable that way.
Any hints ?

Yes there is a smart way for doing this, what you need to do is to refresh your debug bridge, most of the time ddms loose conncetion hence logs are not shown. Just perform the following when this happenes next.
Open CMD,
Navigate to Android SDK, Platform Tools
Write ADB KILL-SERVER, enter, ADB START-SERVER
this will open debug bridge in new port, after doing this just open ddms and select your device

Related

How to resolve "Warning: debug info can be unavailable. Please close other application using ADB: Restart ADB integration and try again"

I am having a slight issue when trying to debug and android app via usb to external device. I keep getting the error "Warning: debug info can be unavailable. Please close other application using ADB: Monitor, DDMS, Eclipse
Restart ADB integration and try again
Waiting for process:"
I have tried stopping adb.exe in task manager , closing android studio and restarting , taking out the cable and putting it back and going to tools => android uncheck adb intergration then recheck it . All to no avail
This is a problem of ADB connections as sometimes ADB cache a dead connection on your real/virtual device and due to which the port is busy and u cannot connect to it.
The simplest solution to this is RESTART your ANDROID phone that's it.
What worked for me was to disable and re-enable USB debugging on the device.
Following steps resolved this issue to me:
Disconnect the device.
Restart android studio.
Run the project.
Simply go to your Android phone developer settings, disable USB debugging, delete all authorizations for USB debugging and turn the debugging on again.
First make sure you close any application use ADB , DDMS
like if you open Eclipse with android studio
Second restart your ADB from terminal
adb kill-server
adb start-server
The issue occurs when I open the Android Studio and IDEA together.
Restart the Android Studio does NOT fix the issue
Re-plugin the cable either does NOT fix the issue
Restart the Mac either does NOT fix the issue
Restart the ADB from terminal FIX the issue
adb kill-server
adb start-server
In this way, you do not need to close the IDEA.
Updated: 2022-09-19
Restart the Android Studio does NOT fix the issue
Invalidate and Restart the Android Studio does NOT fix the issue
Re-plugin the cable either does NOT fix the issue
Restart the Mac either does NOT fix the issue
Restart the ADB from terminal either does NOT fix the issue
Restart the Android device fix the issue.
This problem sometimes occur when Android Studio is opened with another IntelliJ Editor. Just close the other IntelliJ Editor.
Open USB preferences in your device. Like the image below.
Click another option. (eg:File Transfer)
Click the no data transfer.
If it doesn't work,please try again.
The operations on the android devices are similar.
this may happen when you created two instances of android studio, or else you are using same device in multiple ADB programs, so simply disconnect you device and then open your desired android studio instance and then connect again. now it will work fine.
i also use same method and every time it works.
IntelliJ IDEA (Ultimate, probably also Community) comes with Android plugin. If IntelliJ is started and any project is open and has been compiled (even without any Android code-base) then IntelliJ (apparently) steals the adb-connection from Android Studio. Either close IntelliJ or disable the Android plugin in IntelliJ.
If IntelliJ is open with android plugin, rebooting phone, killing adb etc. are only sporadic and short-time fixes of the problem as IntelliJ steals the adb connection again.
I resolved this issue by changing the Use USB for settings
Go to setting select transfer settings in my case MIDI was selected.
Go to Airplane mode ON and OFF , After that everything back to normal.
In my case, I had my device connected both via WiFi (with adb tcpip) and USB cable. Disconnecting the USB cable solved the issue.
Quite awkward issue, I think none of the solutions mentioned above worked for me.
Ultimately, I had to invalidate caches and restart.
File -> Invalidate caches... -> Select both options -> Invalidate and restart
For me was Eclipse using DDMS and conflicting with Android Studio, I wasn't using, so I just uninstall it.
If is your case, go to Eclipse > Help > About Eclipse IDE > Installation Details > Select DDMS and Uninstall..
At times ADB caches a dead connection on device(real / virtual) due to which the port is busy and it is unable to establish a connection.
You can try different ways:
You can kill and restart the server:
adb kill-server
adb start-server
2). Try disconnecting the device(phone) and reconnecting it.
3). Restart your device (phone).
Slightly different answer, but I'm including it for completeness.
For me Android Studio had frozen as well with the spinning beach ball of death.
I rebooted the emulator (by having it emulate a power-off/restart cycle)
Killed Android Studio (on a Mac by using ⌘⌥esc)
Restarted Android Studio.
After that everything was back to normal.
if you open two Android Studio at the same time (android studio preview),Will be like this
A possible temporary work around that may work prove useful for progress sake when intending to debug is to run the app in android studio , then immediately click on run => attach to debugger

Disconnecting Android emularor in eclipse

I'm using eclipse Kepler, and ADT bundle for android development and when I run an android project the emulator began to disconnect. I tried again after restarting the Eclipse IED and even I reboot my machine. But it's stay the same. Can someone help me with some useful advice. Thank you!!!
The communication with the emulator or your Android device might have problems. This communication is handled by the Android Debug Bridge (adb).
Eclipse allows you to reset the adb in case this causes problems. Select therefore the DDMS perspective via Window → Open Perspective → Other... → DDMS
To restart the adb, select the "Reset adb" in the Device View.
for more info : http://www.vogella.com/articles/AndroidDevelopmentProblems/article.html
Open your terminal or Command Prompt of what OS you use , then use the following command
adb kill-server
Then type
adb start-server
finally
adb devices
You should see the attached devices and eclipse will find it. Make sure adb path has been added to your system path before you apply these commands.
I also face with the same issue, Samantha Withanage. When I run the project on the emulator, and face with the same issue, I re-run the project (without closing/restarting anything viz. Emulator, Eclipse or the machine). Then it works fine.
Try this scenario from your end as well. Hope it works for you as well.

running adb from command line makes the device go offline

I have a strange problem where everytime I run adb from command line (devices command or pull, or uninstall etc), the device goes offline but if I now go into DDMS in eclipse and reset ADB, it comes back online. If I am running the game from within eclipse, it runs (by which I mean my Eclipse DDMS is able to use adb just fine) but from command line, doing anything adb-related brings the device offline and the only way to bring it back online is adb reset from DDMS inside eclipse. Effectively, I cannot do anything adb-related through command line.
I have tried solutions like switch the debug option of device on and off, adb-kill-server and then start-server, android 51 rules file, and more weirder solutions like change cable, change port etc. Many of those bring the device online, but whenever I run a adb command from the terminal, poof! device is back offline.
I have been facing this for over a month now and I have done all research I could, on google and on stackoverflow but nothing have I found which could address this specific issue.
Any help is appreciated. Thanks.
The problem is that you are having two version of adb in your computer.
Remove adb.exe,AdbWinApi.dll and AdbWinUsbApi from C:/Windows and everything will be fine.

Constantly getting ...DeviceMonitor] Failed to start monitoring

I find that after running or debugging my application a few times using eclipse, that I get the above output in my console (in red) and I get no feedback from Dalvik as to the connection status to my phone is going. My application will still debug etc. I just get nothing useful in my Console.
Any ideas how to fix this? It appears intermittent. It starts doing it after a few minutes, continues to do it for quite a while and occasionally goes away again. This has happened on my last laptop and now on my new laptop with a completely fresh install etc.
I'm on Windows 7 64 bit; but maybe 2 or 3 times during the day I get this same error. I tried the reboot thing, which sometimes worked, sometimes didn't.
I have found the fix to be:
Close Eclipse
Unplug USB
Open task manager and find the "adb.exe *32" and End Task
Open Eclipse (not done yet)
"Clean All" (not just project)
Then build the project (for me, just building the project works)
Plug USB back in and there ya go!
Always works for me. If anyone knows of an update to something I can download to avoid doing this all the time, I'd love to know!
I had the same problem -
Try to use a different USB port.
From my experience, the USB connections on the PC front are not recommended.
Year almost 2018 I just had same problem which doubled my gray hairs. It turned out my test phone Samsung Galaxy S6 does not like the USB ports on my Apple Thunderbolt Display. I just plugged the USB cable directly to my Mac Pro and it worked right away. Funny thing is my Google Pixel Phone never complains about the USB port on Thunderbolt.
To keep the error message from showing up I did the following on Eclipse 3.7:
Window->Preferences
On the left side tree select Android->DDMS
In the DDMS settings window choose logging level "Assert"
Click "Apply"
You may have to kill the deamon and restart it. Following are the steps;
open a command prompt and locate the SDK's platform tools folder. E.g.:- cd c:\android-sdk-windows\platform-tools
then execute "adb kill-server" command. You will see the disconnected icon in run configuration panel is now cleared.
then again execute "adb start-server" command.
Then try running the device, if it doesn't work try restarting the eclipse.
restart your dev machine, worked for me :)
I was using a USB 3.0 port too and a device Xoom with ics 4.0.
To solve my problem, I needed to restart my Windows, because in the DDMS my device was showed twice.
After the restart, I needed to change the USB port to a 2.0 USB port and it work for me.
problem causes bay USB bug
1- save your work
2- Close Eclipse
3- restart your computer
4- Open Eclipse and enjoy ^^
it works for me
good luck

My device is not showing up in "Android Device Chooser" suddenly

i am using my samsung galaxy3 device for testing my apps from last two months. It is working fine.
But suddenly from this morning when i connected my device to my system it is not showing up in the "Android Device chooser" window.
I have checked, USB debug mode is in checked state only in my device.
Can anybody guess the problem. It is little urgent.
Thanks,
Nehatha
Use a shell of some sort (Run -> cmd) and browse to the /platform-tools/ directory inside the place you installed the Android SDK Tools.
Shut down Eclipse, unplug your device and try running:
adb kill-server
adb start-server
Plug it back in and run
adb devices
If you can see it, good. Now run:
adb logcat -c
adb logcat
This will flush the current logcat output and then show the logcat output in the shell as it updates (do something on the device and the log will update). Stop it with Ctrl-C and restart Eclipse.
This has helped for me sometimes.
Also, rebooting helps.
I have another similar issue over here which I haven't found an answer to yet: Device going offline randomly (and appearing multiple times as offline) in Eclipse - fixes?
Hope some of it helps.
I have the same problem and I figured out the solution for me.
On the home screen of your device choose Menu > Settings > Applications > Development.
Make sure that ‘USB debugging’ is checked.
Hope it will help someone :)
close the emulator then restart eclipse.
Finally my device is working after "Factory data Reset".
Thanks you all for your suggestions, even those suggestions not worked for me, I came to know about other useful.
Thank You.
I had similar issue, what worked for me was switching to "connected as camera" mode instead of "connected as media device" from the USB options menu, then performing Klaus's solution (kill server, start server).

Categories

Resources