Android – How to automatically clear logcat output before each run in Android Studio

androidandroid-gradle-pluginandroid-logcatandroid-studio

I'm using Android Studio 1.0.2 and can't find the way to clear logcat output before each Run/Debug.

Is there any Gradle task (similar to adb logcat -c) that I can create a Run/Debug configuration for in order to clear output? Or is there simpler way to clear the logcat?

Best Answer

This can be customized for each existing run configuration you have defined. Instructions for enabling this feature are given below:


Android Studio 1.4 and later

Check the checkbox located at:

Run -> Edit configurations... -> Miscellaneous tab -> "Clear log before launch"


Android Studio 1.3 and earlier

Check the checkbox located at:

Run -> Edit configurations... -> Logcat tab -> "Clear Log before launch"