You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Android Studio Logcat异常求助:自动切换标签与日志未清除问题

Android Studio Logcat 两个问题的解决方法

问题1:重新运行应用时自动切换到Run标签页

  • 打开Settings(Windows/Linux:File > Settings;Mac:Android Studio > Settings)
  • 进入Build, Execution, Deployment > Build Tools > Gradle,将Run tests using设置为Gradle
  • 再到Advanced Settings > Debugger,取消勾选Auto activate Run tool window选项
  • 检查Run配置:打开Run/Debug Configurations,选中你的应用配置,在General标签下取消勾选Activate tool window

问题2:重新运行应用时Logcat日志不自动清除

  • 在Logcat标签页顶部,找到「清除日志」按钮旁的下拉箭头,勾选Clear log on app launch
  • 若上述选项已勾选仍无效,确认Logcat过滤模式为Show only selected application(而非全局日志)
  • 也可编辑过滤规则:点击Logcat右上角的「Edit Filter Configuration」,在Logcat Options中勾选Clear log on filter apply

内容的提问来源于stack exchange,提问作者zanzanguitar

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.19 20:12:00