使用Androidstudio查看手机的日志可参考以下步骤:
1、打开androidstudio随便进入一个工程进入主界面
/iknow-pic.cdn.bcebos.com/14ce36d3d539b60006212b32e750352ac75cb743"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/14ce36d3d539b60006212b32e750352ac75cb743?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="
https://iknow-pic.cdn.bcebos.com/14ce36d3d539b60006212b32e750352ac75cb743"/>
2、点击底部androidmoniter打开安卓连接设备信息查看页面
/iknow-pic.cdn.bcebos.com/1f178a82b9014a9013d06238a7773912b21bee4d"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/1f178a82b9014a9013d06238a7773912b21bee4d?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="
https://iknow-pic.cdn.bcebos.com/1f178a82b9014a9013d06238a7773912b21bee4d"/>
3、把手机与电脑通过数据线连接,打开开发者选项。
/iknow-pic.cdn.bcebos.com/503d269759ee3d6d41f2a04e4d166d224f4ade7a"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/503d269759ee3d6d41f2a04e4d166d224f4ade7a?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="
https://iknow-pic.cdn.bcebos.com/503d269759ee3d6d41f2a04e4d166d224f4ade7a"/>
4、连接上手机后可以看到androidmoniter部分有设备名称出现,且logcat下有log日志输出
/iknow-pic.cdn.bcebos.com/3ac79f3df8dcd10019c9dfa47c8b4710b8122fd9"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/3ac79f3df8dcd10019c9dfa47c8b4710b8122fd9?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="
https://iknow-pic.cdn.bcebos.com/3ac79f3df8dcd10019c9dfa47c8b4710b8122fd9"/>
5、点击右侧的选项可以进行日志等级筛选,一般info的日志很多,若想看一些崩溃信息,可以选择warn等级
/iknow-pic.cdn.bcebos.com/574e9258d109b3de15a3deedc2bf6c81800a4c12"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/574e9258d109b3de15a3deedc2bf6c81800a4c12?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="
https://iknow-pic.cdn.bcebos.com/574e9258d109b3de15a3deedc2bf6c81800a4c12"/>
6、点击左侧的功按钮可以进行清空当前的日志,或者打印所有日志输出。
/iknow-pic.cdn.bcebos.com/cb8065380cd79123dd53b3f1a3345982b3b78087"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/cb8065380cd79123dd53b3f1a3345982b3b78087?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="
https://iknow-pic.cdn.bcebos.com/cb8065380cd79123dd53b3f1a3345982b3b78087"/>