I have the following test code in my Activity:
@Override
public void onStart() {
super.onStart();
Log.e(CLASS_NAME, \"ERROR onStart()\");
Log.w(C
I was trying everything. From log.d
to log.wtf
. But nothing worked.
Then I restarted my Android Studio. After that, the debugger started working again.
Hope this helps to someone.
i had the same problem. I switched off and on developer options and usb debugging and all logs worked. i also enabled gpu debug layers in developer options(i dont think that helped).
For me the issue was that I had actually disabled the logger buffer in my developer settings so go to Settings -> Developer options -> Logger buffer size and set it to anything that isn't 'off'.
Turn off your Developer Option then Restart Your Phone After that on developer option It definitely works by sure!!
I had similar problem to this one. However in my case the problem was empty first string. It worked in older version of Android Studio, but stopped working in Android Studio ver 5.6 after update.
When I used:
Log.d(string1, string2);
in my logging wrapper class,
then whenever string1 was "", the logcat would ignore it. The solution was to add
if(string1 == null || string1 == "") {
string1 = "defaultString";
}
before
Log.d(string1, string2);
I hope this helps anyone with this problem.
Accepted answer not working
My solution:
when your
Log.d
is not working thenLog.wtf
is work
It's working for me, may be this is helpful to other, who find solution