android studio 中 adb logcat 在這裡敲

來源:互聯網
上載者:User

標籤:翻譯   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 在這裡敲

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.