I debug the application via USB, Android Studio does not write anything to logcat. Previously, everything was fine, but now there is no information at all, even if the filters are removed. I delved into the Developer Functions on the smartphone, I did not find anything.

I found this:

enter image description here

  • Do you have a case of a non-release build? - Yuriy SPb
  • @YuriySPb yes, recently made Google to start authorization. Could that have affected? - Maxgmer
  • This is exactly the point - YurySPb

2 answers 2

If you are running a release build of an application, then you most likely do not have it written in gradle debuggable true .

 buildTypes { release { debuggable true } } 

The second way to enable logs in the release assembly is to specify this attribute in the manifest via the attribute of the Application tag.

 android:debuggable="true" 

The best option is to configure the options for the assembly so that you can enable / disable the logs for the release assembly in various ways like this:

 buildTypes { debug { resValue "bool", "debuggable", "true" } release { } } productFlavors { dev { resValue "bool", "debuggable", "true" } prod { resValue "bool", "debuggable", "false" } } 

In the manifest, provide a link to the generated gradl resource:

 android:debaggable="@bool/debuggable" 

Now you can build the devRelease build with enabled logs and prodRelease with disabled. And debug builds will always be enabled.

  • one
    thank you so much!) - Maxgmer
  • damn, came home, tried, something didn’t work, added debuggable true to my release buildType, but the logs don’t go - Maxgmer
  • one
    @Maxgmer, as I understood from the edit, was it a typo? - Yuriy SPb
  • one
    @ Maxgmer, i.e. you have not had a release build before, and there are no logs in the debug as well? .. And you cannot collect a release because You do not have a signing configuration for release. Here it is written how to do it: ru.stackoverflow.com/q/564515/17609 - JuriySPb
  • one
    oh my goodness, it worked !! 4 hours later! I just clicked on the trash can on the left in the logcat'a menu! I apologize for the time spent on me! I do not know what makes this trash can, but he saved me!)) - Maxgmer

Enable this in Android Studio:

Tools -> Android -> Enable ADB Integration