Very frustrated about android debugging mode and reading output in logcat - android

this is my first time asking a question on stackoverflow.
I'm working on a small app on android just for fun over the school break. My app is working fine and displays logcat just fine when I am running it on emulator. But when everytime I try to run the app on my phone through debugging bridge, logcat never displays at all. I've tried every methods that I was able to find on google including:
going into ddms and selecting my device
using adb logcat -d foo:D *:S which only displays
--------- beginning of /dev/log/system
--------- beginning of /dev/log/main
etc
I remember it was working fine quite a while ago but since i have changed to my brand new computer it just don't work anymore. Please help :( im stuck here for like 3 hours now
thank you guys =)

Try some tricks below
Sometimes phone is not recognized by the driver. Run
sudo ./adb kill-server
sudo ./adb start-server
Update ddms, the latest ones are good, and there are fixes for many issues
Run ddms from command line, the one in eclipse is not as good as the command line one.

We cant exactly predict what may be the problem , but try these methods which may workout sometime.
*Use the command adb remount
*select the device within which select your application process
*Use the TAG for your logs and create new filter with that log name.
*Click between your filter and All messages in Log cat.
*Try re connecting the device again.
If still there is problem then please share more information.

I've just solved the issue by using Log.e instead of other log levels. This took me so long time to figure it out, i've reinstalled my eclipse and adb but it didn't help at all.
I don't know if this is just for me but i hope this helps for some of you who are having same trouble as me
use Log.e !!

Related

Dragonboard 410c crashes just after bootup automatically

The Dragonboard 410c with the android crashes immediately after bootup. I tried the same thing with 2 different new dragonboards. In order to cross check, I again installed a new android through SD card but, issue still persists.
I wanted to run ADB commands through the dragonboard.
Initially it used to crash after ADB root and ADB reboot commands and I had to disconnect and reconnect the adapter to start it again. But now it just flashes and then crashes even before I write the commands.
It would be a great help if someone can help me fix this thing and know the reason behind such indefinite crashes ?
P.S.: No such problems were there with the 201c module.

Logcat not working on MAC

Ive recently started on Android programming and I just want to print a simple text on console. Seems that Logcat is the fastest way to do that, however its not working on MAC. What is missing?
Log.d("MYTAG", "PRINT");
Sometimes, especially on emulator devices, ADB can get stuck and stop working. Try going to Terminal tab and typing adb kill-server. Restart your app with control+D/R and you should be good to go

Why won't my logs be displayed in the logcat?

I'm using Eclipse Indigo and up until just a couple hours ago or so everything was working fine. When I just relaunched it and made a couple changes, I ran the program on my phone but my logs were not being displayed. The phone's logs are displayed in the logcat, but nothing from the project is. I have the device selected, I've tried restarting eclipse multiple times, I've reset the ADB, and I've run the commands adb usb and adb logcat (which still doesn't display my logs). I know my logs are correct: Log.e("Tag","Message"); Anyone have any other ideas?
As it turns out, it was a stupid error on my part. I had my logs set up as: Log.e("Tag","") instead of: Log.e("","Message"). Apparently, if you have the former, it won't display to the LogCat, go figure?
I think, you haven't selected device or emulator , on which running your application,
In eclipse go to DDMS Perspective and select device or emulator on which you are running your application.
(Note: No need to restart the Eclipse)

Failed to install *.apk on device timeout Launch canceled

I read all threads about this problem but the mentioned answers in the threads don't work for me. Can I find out which is the timeoutproblem with the help of a logfile? Is it possible that on my pc are drivers which have problems with the adb? How the adb works in detail if i start the debug process? Can anybody help me with this problem? I spent 16 hours of finding out what the problem is, but the only things I found out are that the problem has nothing to do with the installation of the eclipse, the adt plugin or the android sdk installation. Something with the connection between the emulator or my real device dont work.
If i create a new project and only change the appname or the text in the standard textview, then the app can be launched on the devices. If i do more changes for example create a new layout or something then the app wont work anymore. I am very frustrating in finding out whats wrong with the adb but till now i dont have luck to solve the problem. I hope someone can help me and others with the same problem. thanks.
In eclipse, you can increase the timeout. In Eclipse, Go to preferences>In the dialog select android>DDMS>increase the timeout value
you could also try to reboot your phone, or restart your adb server
adb kill-server
adb start-server
it worked for me :)
(increasing timeout value didn't work for me)

Android Debugger (on Netbeans7)

I just started using the ADB Log yesterday (Window -> Output -> ADB Log) and it showed me where my error was coming from as debuggers should. However, when I started it up today it won't show anything other than Error - No devices found then it tries to reconnect in 10 seconds. Eventually it just states that the device is offline.
I have the emulator up and running and replicated the error I had yesterday but still nothing useful from the debugger shows up. I haven't changed anything since yesterday and am not sure why I'm having the issue.
Does anyone know of any possible fixes?
Quick tip (this may or may not solve your problem): In your DDMS view, if the device isn't selected (in the left list of devices with their running processes), then nothing will display in logcat.
Also sometimes I have to run the following command when adb starts acting buggy:
adb kill-server
adb start-server (or adb devices)
EDIT: This is for Eclipse - not sure about Netbeans
Also: I have found that some cables do not work with debugging, only charging (these are cheaper cables). I had something like the same issue, once I used a better cable it started working.

Categories

Resources