{"id":11675,"date":"2022-11-21T17:16:14","date_gmt":"2022-11-21T09:16:14","guid":{"rendered":"https:\/\/www.yimenapp.com\/kb-yimen\/?p=11675"},"modified":"2022-11-21T17:16:17","modified_gmt":"2022-11-21T09:16:17","slug":"logcat%e4%bd%bf%e7%94%a8%e9%99%90%e5%88%b6","status":"publish","type":"post","link":"https:\/\/www.yimenapp.com\/kb-yimen\/11675\/","title":{"rendered":"Logcat\u4f7f\u7528\u9650\u5236"},"content":{"rendered":"\n<p><span class=\"wpcom_tag_link\"><a href=\"https:\/\/www.yimenapp.com\/kb-yimen\/tag\/logcat\/\" title=\"Logcat\" target=\"_blank\">Logcat<\/a><\/span>\u662f<span class=\"wpcom_tag_link\"><a href=\"https:\/\/www.yimenapp.com\/kb-yimen\/tag\/android\/\" title=\"Android\" target=\"_blank\">Android<\/a><\/span> \u7cfb\u7edf\u63d0\u4f9b\u7684\u5b9e\u65f6\u67e5\u8be2\u7cfb\u7edf<span class=\"wpcom_tag_link\"><a href=\"https:\/\/www.yimenapp.com\/kb-yimen\/tag\/%e6%97%a5%e5%bf%97\/\" title=\"\u65e5\u5fd7\" target=\"_blank\">\u65e5\u5fd7<\/a><\/span>\u7684\u547d\u4ee4\u5de5\u5177\uff0c\u5e2e\u52a9\u5f00\u53d1\u8005\u5728\u5f00\u53d1\u8c03\u8bd5\u9636\u6bb5\u5b9a\u4f4d\u95ee\u9898\uff0c\u4f18\u5316\u81ea\u8eab\u529f\u80fd\u3002\u7136\u800c\u5bf9logcat\u65e5\u5fd7\u4f7f\u7528\u4e0d\u5f53\u4e5f\u4f1a\u5bfc\u81f4\u4e00\u4e9b\u95ee\u9898\uff0c\u5982\u4e2a\u4eba\u4fe1\u606f\u6cc4\u6f0f\/\u529f\u8017\u7b49\uff0c\u800c\u5f00\u53d1\u8005\u5bf9\u8fd9\u4e9b\u95ee\u9898\u5219\u5173\u6ce8\u7684\u5c11\uff0c\u4e3a\u6b64vivo\u9488\u5bf9logcat\u505a\u4e86\u90e8\u5206\u7684\u5b9a\u5236\uff0c\u4ee5\u9632\u6b62\u51fa\u73b0\u7c7b\u4f3c\u7684\u95ee\u9898\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><a><\/a>1. \u6253\u5370\u884c\u6570\u9650\u5236<\/h2>\n\n\n\n<p>vivo\u9650\u5236\u4e86logcat\u8f93\u51fa\u65e5\u5fd7\u7684\u9891\u7387\uff0c\u9650\u5236\u5355\u4e2a\u8fdb\u7a0b\u6bcf\u79d2\u53ea\u80fd\u6253\u5370 250\u884c\uff0c\u4e00\u79d2\u5185\u8d85\u51fa\u7684\u65e5\u5fd7\u5c06\u4f1a\u76f4\u63a5\u4e22\u5f03(\u6bcf\u4e00\u79d2\u7684\u65e5\u5fd7\u90fd\u662f\u91cd\u65b0\u8ba1\u6570)\uff0c\u5e76\u4e14\u6253\u5370\u4ee5\u4e0b\u7684\u65e5\u5fd7\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/kb.cdn.yimenapp.com\/yimen\/2022\/11\/20221121171614727.png\" alt=\"image.png\" title=\"image.png\"\/><\/figure>\n\n\n\n<p>\u8be5\u65e5\u5fd7\u662f\u5bf9\u5e94\u7684\u8fdb\u7a0b\u4e2d\u6253\u5370\u7684\uff0cdrop \u5173\u952e\u5b57\u540e\u9762\u8868\u793a\u4e86\u5f53\u524d\u4e22\u5931\u4e86\u591a\u5c11\u884c\u7684\u65e5\u5fd7\uff0c\u884c\u6570\u9650\u5236\u4e0d\u533a\u5206\u65e5\u5fd7\u7b49\u7ea7\u3002<\/p>\n\n\n\n<p>\u5e94\u7528\u5f00\u53d1\u8005\u9700\u8981\u63a7\u5236\u81ea\u8eab\u7684\u65e5\u5fd7\u6253\u5370\u91cf\uff0c\u4e0d\u80fd\u65e0\u4f11\u6b62\u7684\u5237\u65e5\u5fd7\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong><a><\/a>2. \u654f\u611f\u6570\u636e\u8fc7\u6ee4<\/strong><\/h2>\n\n\n\n<p>\u4efb\u4f55\u7684Android\u624b\u673a\u53ea\u8981\u6253\u5f00\u4e86\u5f00\u53d1\u8005\u9009\u9879\uff0c\u90fd\u53ef\u4ee5\u901a\u8fc7logcat\u6253\u5370\u7cfb\u7edf\u65e5\u5fd7\uff0c\u82e5\u65e5\u5fd7\u4e2d\u6709\u4e2a\u4eba\u6570\u636e\u6253\u5370\u5219\u975e\u5e38\u5371\u9669\uff0c\u4e3a\u6b64vivo\u5728logcat\u7684\u8f93\u51fa\u589e\u52a0\u4e86\u654f\u611f\u4fe1\u606f\u8131\u654f\u529f\u80fd\uff0c\u8f93\u51fa\u7684\u65e5\u5fd7\u4e2d\u6709\u654f\u611f\u7684\u6570\u636e(\u5982\uff1a\u624b\u673a\u53f7\uff0c\u8bbe\u5907ID\uff0c\u7ecf\u7eac\u5ea6\uff0cip\u5730\u5740\uff0cURL\u7b49)\uff0c\u90fd\u4f1a\u5168\u90e8\u8f6c\u6362\u4e3a\u661f\u53f7\u3002<\/p>\n\n\n\n<p><strong>\u672a\u8131\u654f\u65e5\u5fd7<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/kb.cdn.yimenapp.com\/yimen\/2022\/11\/20221121171615667.png\" alt=\"image.png\" title=\"image.png\"\/><\/figure>\n\n\n\n<p><strong>\u8131\u654f\u540e\u65e5\u5fd7<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/kb.cdn.yimenapp.com\/yimen\/2022\/11\/20221121171615134.png\" alt=\"image.png\" title=\"image.png\"\/><\/figure>\n\n\n\n<p><strong>\u5907\u6ce8\uff1a<\/strong>\u5728\u65b0\u7684\u673a\u578b\u4e0a\uff0c\u7cfb\u7edf\u505a\u4e86\u533a\u5206\u5904\u7406\uff0cdebug\u7248\u672c\u5e94\u7528\u6253\u5370\u7684\u5185\u5bb9\u4e0d\u4f1a\u8131\u654f\uff0crelease\u7248\u672c\u7684\u4f1a\u8131\u654f\uff0c\u6ee1\u8db3\u5f00\u53d1\u8005\u7684\u8c03\u8bd5\u9700\u8981\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><a><\/a>3. Logcat\u8c03\u7528\u9650\u5236<\/h2>\n\n\n\n<p>APP\u82e5\u5728\u8fd0\u884c\u65f6\u9700\u8981\u8bfb\u53d6\u7cfb\u7edf\u65e5\u5fd7\u5b9a\u4f4d\u81ea\u8eab\u53d1\u751f\u7684\u5f02\u5e38\uff0c\u8c03\u7528 logcat \u547d\u4ee4\u65f6\u5fc5\u987b\u589e\u52a0 -d \u53c2\u6570\uff0c\u5373\u8c03\u7528logcat\u4e0d\u80fd\u963b\u585e\u8fdb\u7a0b\u4e00\u76f4\u7b49\u5f85\uff1b\u82e5\u5e94\u7528\u672a\u589e\u52a0\u6b64\u53c2\u6570\uff0c\u5219\u7cfb\u7edf\u4f1a\u7279\u6b8a\u5904\u7406\uff0c\u5b9e\u73b0\u540c\u7b49\u6548\u679c(\u589e\u52a0\u53c2\u6570-d)\u3002\u5982\u4e0b\u683c\u5f0f\uff1a<strong>logcat -d&nbsp;<\/strong>\u3002<\/p>\n\n\n\n<p>\u589e\u52a0 -d \u53c2\u6570\u540e\uff0clogcat \u4ec5\u4ec5\u4f1a\u8bfb\u53d6\u5f53\u524d\u7cfb\u7edf\u7f13\u5b58\u7684\u65e5\u5fd7\uff0c\u7136\u540e\u76f4\u63a5\u9000\u51fa\uff0c\u4e0d\u4f1a\u4e00\u76f4\u963b\u585e\u4f4f\u3002\u672a\u589e\u52a0 -d \u53c2\u6570\u5219\u4f1a\u6301\u7eed\u8f93\u51fa\u7cfb\u7edf\u65e5\u5fd7\uff0c\u5bf9\u7cfb\u7edf\u8d1f\u8f7d\u5f71\u54cd\u5927\uff0c\u7279\u522b\u662f\u7cfb\u7edf\u65e5\u5fd7\u91cf\u591a\u7684\u65f6\u5019\uff0c\u5bf9\u529f\u8017\u7684\u5f71\u54cd\u4f1a\u975e\u5e38\u7684\u5927\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Logcat\u662fAndroid \u7cfb\u7edf\u63d0\u4f9b\u7684\u5b9e\u65f6\u67e5\u8be2\u7cfb\u7edf\u65e5\u5fd7\u7684\u547d\u4ee4\u5de5\u5177\uff0c\u5e2e\u52a9\u5f00\u53d1\u8005\u5728\u5f00\u53d1\u8c03\u8bd5\u9636\u6bb5\u5b9a\u4f4d\u95ee\u9898\uff0c\u4f18\u5316\u81ea\u8eab\u529f\u80fd\u3002<\/p>\n","protected":false},"author":1,"featured_media":11676,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46,94,160],"tags":[465,5349,810,5350,3815],"special":[66],"attr":[],"class_list":{"0":"post-11675","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-appsj","8":"category-appjc","9":"category-appcs","10":"tag-android","11":"tag-logcat","12":"tag-vivo","14":"tag-3815","15":"special-vivokfpt","16":"entry"},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/posts\/11675","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/comments?post=11675"}],"version-history":[{"count":1,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/posts\/11675\/revisions"}],"predecessor-version":[{"id":11679,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/posts\/11675\/revisions\/11679"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/media\/11676"}],"wp:attachment":[{"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/media?parent=11675"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/categories?post=11675"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/tags?post=11675"},{"taxonomy":"special","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/special?post=11675"},{"taxonomy":"attr","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/attr?post=11675"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}