Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resolve when Logcats stops working in Android Studio?

Logcat has stopped working for me again in Android Studio. Last time it happened I had to reinstall the IDE, and I want to avoid it again.

What I did for this to happen was changing...

Log.d("WRONG", "TEST");

to

Log.d("LOG", TEST");

and then changed the tag back to "WRONG" again. Now Logcat wont show any of my debug messages even if I remove WRONG from the filter when the app is running on my phone. The emulator still provides debug messages.

text

I already tried:

  • Checked if Android Device Monitor is active.
  • Restarting Logcat.
  • Change from Verbose to Debug and back to Verbose.
  • Unplugging the phone.
  • Restarting Android Studio.
  • Invalidate cache / Restart (in File menu).
  • Uninstalling the app.
  • Restarting the computer.
  • All of the above at the same time.
  • Changing phone.
  • Switching USB cable.

  • Opening Android Studio Manager. It bugged out and the log told me »java.io.IOException: The folder "C:\Users\Logga%20in.android\monitor-workspace.metadata" is read-only.«

[edit: tried even more solutions]

  • Using the terminal in Android Studio. Going to android sdk\platform-tools folder and typing adb kill-server followed by adb start-server.
  • opening Dalvik Debug Monitor through Command and checking the log there.
  • adding android:debuggable="true" to the manifest (under the application tag).

I'm using Android Studio 2.1 but the same thing happened when I was using 2.0b.

like image 729
Rickard Elimää Avatar asked May 12 '16 10:05

Rickard Elimää


People also ask

Why my Logcat are not working Android Studio?

Solution 1: Restarting your Android StudioIn your IDE Go to File > Invalidate Caches and Restart > Invalidate and Restart. This Solution will clear all the caches of Android studio IDE and restart it automatically, By the method, there are 80% change that Logcat will start work as before.

What is Logcat buffer?

Logcat is a command-line tool that dumps a log of system messages, including stack traces when the device throws an error and messages that you have written from your app with the Log class. This page is about the command-line logcat tool, but you can also view log messages from the Logcat window in Android Studio.

Why do you use Logcat in Android Studio?

Then, Logcat Window is going to help you to debug the output by collecting and viewing all the messages that your emulator throws. So, this is a very useful component for the app development because this Logcat dumps a lot of system messages and these messages are actually thrown by the emulator.


1 Answers

enter image description here

In my case in Android 2.2, for some reason, Firebase was selected by default in the dropdown box marked above. So logs didn't drop. I just needed to change it to No Filters

Hope this helps someone.

like image 159
Cletus Ajibade Avatar answered Oct 25 '22 16:10

Cletus Ajibade