在终端中显示 Logcat?
编辑/解决方案:在platform-tools目录中执行./adb logcat
。
原始问题:
我知道有一种方法可以在 Mac 上的终端中显示 Android 设备/模拟器的 LogCat
,但我不确定该命令是什么。这主要是由于我对 UNIX 命令的不熟练。
以下是我之前的失败经历:
adb logcat
adb.exe logcat
FULL_PATH_TO_PLATFORM_TOOLS/adb logcat
FULL_PATH_TO_PLATFORM_TOOLS/adb.exe logcat
Edit/Solution: execute ./adb logcat
in the platform-tools directory.
Original Question:
I know that there's a way to display the LogCat
for an Android device/emulator in Terminal on my Mac, but I'm not sure what the command is. This is mostly due to my incompetence with UNIX commands.
Here are my previous failures:
adb logcat
adb.exe logcat
FULL_PATH_TO_PLATFORM_TOOLS/adb logcat
FULL_PATH_TO_PLATFORM_TOOLS/adb.exe logcat
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
啊,只需
adb logcat
就可以了。如果 Android SDK 工具目录不在您的 PATH 中,您可能需要执行显式路径,但这应该可以做到。Ah, just
adb logcat
should work. You may need to do an explicit path if the Android SDK tools directories aren't in your PATH, but that should do it.如果你有NPM,你可以安装模块:
这将使你开始在控制台和//127.0.0.1/中监视彩色logcat。
这里是描述
If you have NPM, you could install module:
that will provide you to start monitoring colored logcat in console and //127.0.0.1/.
Here is description
在终端模拟器中:
显然,这会将 logcat 内容放入
/sdcard/logfile.txt
(您的 sd 卡主目录)中。来源(有更多获取logcat的方法):
In Terminal Emulator:
This will put the logcat content in
/sdcard/logfile.txt
(your sd card main directory) obviously.Source (with more ways to acquire logcat):