標籤:翻譯 image color nbsp orm 日誌 family shel create
官方視頻和網路大都沒有詳細介紹命令列(IDE整合的那個比較容易看到)下 logcat 最初怎麼進入,倒是具體用法詳細的翻譯了官網的文檔。
所以記錄如下:
(1)下面的官網上寫了
https://developer.android.com/studio/command-line/logcat.html#Syntax
(科學上網)
(2)摘要如下:
Command-line Syntax
[adb] logcat [<option>] ... [<filter-spec>] ...
You can run logcat as an adb command or directly in a shell prompt of your emulator or connected device. To view log output using adb, navigate to your SDK platform-tools/ directory and execute:
$ adb logcat
You can create a shell connection to a device and execute:
$ adb shell
# logcat
(3)看紅色的部分,找到工具位置
(4)在命令列下進入該目錄,執行
adb shell
logcat
(5)方便使用寫個指令碼,每次點一下
@echo offset adbPath=C:\Users\computer\AppData\Local\Android\sdk\platform-toolscd %adbPath%adb shellPause
(6)other
Log.d 可能列印不出來,這個可能是手機的設定問題,我在華為的榮耀機型上測試發現,
需要 開啟log設定(輸入一串數字)的電源日誌,也不知道他們是怎麼想的。
其他具體怎麼用,等 隨便一搜就一堆,大都類似。
android studio 中 adb logcat 在這裡敲