简体   繁体   English

Android:在启动时通过模拟器在Eclipse中没有logcat输出

[英]Android: no logcat output in Eclipse via Emulator on boot

I'm writing an Android app that starts up on boot. 我正在编写一个启动时启动的Android应用程序。 I'm developing/testing it under Eclipse using the Emulator. 我正在使用Emulator在Eclipse下开发/测试它。 This app is crashing during boot-up, but there is no logcat output for me to examime in order to debug this issue, even though I get proper logcat output from the same app if I invoke it manually, after boot-up, with the same Eclipse and logcat configuration. 这个应用程序在启动过程中崩溃了,但是为了调试这个问题我没有logcat输出,即使我从同一个应用程序获得正确的logcat输出,如果我在启动后手动调用它,相同的Eclipse和logcat配置。

Here's how I boot the Emulator: (1) I stop it; 这是我启动模拟器的方法:(1)我停止它; (2) I restart it via Android Virtual Device Manager with "launch from snapshot" NOT set. (2)我通过Android虚拟设备管理器重新启动它,并设置了“从快照启动”。 When I do this, the app starts up and dislays some Toasts before crashing, so I know it at least begins to run before dying, but I see no logcat output in Eclipse. 当我这样做时,应用程序启动并在崩溃之前显示一些Toast,所以我知道它至少在死亡之前开始运行,但我在Eclipse中看不到logcat输出。

Does anyone know how to force logcat output to show up in Eclipse's logcat window when invoking an on-boot app within the Emulator? 有没有人知道如何在模拟器中调用on-boot应用程序时强制logcat输出显示在Eclipse的logcat窗口中? Thanks. 谢谢。

It does this automatically. 它会自动执行此操作。 Make sure that you go over to the DDMS perspective and choose the new emulator instance, as LogCat may be showing you the contents of your previous emulator instance, or nothing at all if nothing is selected in the DDMS Devices view. 确保您转到DDMS透视图并选择新的仿真器实例,因为LogCat可能会向您显示先前仿真器实例的内容,如果在DDMS设备视图中未选择任何内容,则根本不显示任何内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM