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

求助:Android Studio 3.1及更早版本日志无法正常显示

Hey there, I’ve run into this exact log display issue multiple times across different Android Studio versions, so I feel your pain! Let’s walk through some proven fixes that should get your logs showing up properly again:

Fixes for Missing Logs in Android Studio 3.1 (and Older Versions)
  • Double-check Logcat Filter Settings
    The most common culprit is a misconfigured filter.

    • Make sure the "Show only selected application" dropdown is actually picking your app’s process (it should display your app’s package name). If it’s set to a different process or a custom filter that’s too strict, your logs will get hidden.
    • Temporarily switch the log level to "Verbose"—sometimes higher levels like Info or Debug might exclude logs you’re expecting.
  • Restart Logcat (and Android Studio)
    Don’t underestimate the power of a quick reset:

    • Click the circular arrow Restart button in the Logcat toolbar to refresh the log stream.
    • If that doesn’t work, fully close Android Studio, kill any leftover studio.exe/studio.sh processes in your task manager, and restart the IDE. The Logcat daemon can get stuck and needs a fresh start.
  • Invalidate Caches and Restart
    Corrupted cache files often cause weird IDE glitches:

    • Go to File > Invalidate Caches... > Invalidate and Restart. This clears out stale data and forces Android Studio to rebuild its indexes, which frequently resolves log display issues.
  • Reset ADB Connection
    A flaky ADB link can block log transmission:

    • Open Android Studio’s Terminal and run these commands:
      adb kill-server
      adb start-server
      
    • Run adb devices to confirm your emulator/device is listed and recognized. If not, reconnect the device or restart the emulator.
  • Check Device/Emulator Log Restrictions
    Some devices or emulators limit log output by default:

    • For emulators: Use the latest system image, and try wiping emulator data (AVD Manager > Select your emulator > Wipe Data) to reset its state.
    • For physical devices: Go to Settings > Developer Options > Debugging, ensure your app is selected as the "Select debug app", and enable "Disable adb authorization timeout" if you’re facing connection drops.
  • Verify Your App’s Logging Code
    Sometimes the issue isn’t with Android Studio—it’s with your logging implementation:

    • Double-check you’re using Log.d(), Log.i(), etc., with valid tags and messages. Avoid Log.v() if your log level is set higher than Verbose.
    • If you’re using ProGuard/R8, add these rules to proguard-rules.pro to prevent log statements from being stripped:
      -keepclassmembers class * {
          public static android.util.Log *;
      }
      
  • Update Android Studio and SDK Tools
    Outdated versions have known Logcat bugs:

    • Go to Help > Check for Updates (Windows/Linux) or Android Studio > Check for Updates (macOS) to install the latest patches.
    • Also, update SDK Platform Tools via the SDK Manager—this fixes compatibility issues with newer devices/emulators.

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.21 06:46:57