简体   繁体   English

如何通过Eclipse跟踪错误? 如何将电话连接到DDMS? 一些司机失踪

[英]How to trace errors via Eclipse? How to connect the phone to the DDMS? Some drivers missing

I want to trace an app's error that occurs at a certain time. 我想跟踪某个时间发生的应用程序错误。 A coleague told me I had to start eclipse, open the DDMS, plug in the phone in MTP mode and when I use the app, the log is going to show the errors. 一位同事告诉我,我必须开始蚀,打开DDMS,以MTP模式插入电话,当我使用该应用程序时,日志将显示错误。

I tried that but phone is not showing in the DDMS. 我试过了,但是DDMS中没有显示电话。 When I plugged it in windows 7, it couldnt find 2 drivers - SAMSUNG_ANDROID and CDC. 当我将其插入Windows 7时,找不到2个驱动程序-SAMSUNG_ANDROID和CDC。

What do I do? 我该怎么办?

Phone is Galaxy s2 android ersion is 2.3.4 手机是Galaxy s2安卓版本是2.3.4

I have USB debugging enabled on my phone 我在手机上启用了USB调试

Install the drivers for samsung. 安装三星驱动程序。 Connect your device to PC and Make USB Debugging on. 将设备连接到PC并打开USB调试。

Application/Development/USB Debugging. 应用程序/开发/ USB调试。

Go to Run Configuration : And select your device to debug you application. 转到“运行配置”:并选择设备以调试应用程序。

You can easily debug using logcat . 您可以使用logcat轻松调试。

First Update your google usb Driver in SDK manager. 首先在SDK管理器中更新您的google usb驱动程序。 then Connect Your Phone in USB Debugging mode . 然后在USB调试模式下连接手机。 In windows go to Device manager where you can find your mobile in other device tab. 在Windows中,转到设备管理器,您可以在其他设备选项卡中找到您的手机。 right click on the device and select update driver. 右键单击设备,然后选择更新驱动程序。 from that popup window select driver from SDK android-sdks\\extras\\google\\usb_driver\\androidwinusb86 and update it .then you can find mobile on DDMS. 从该弹出窗口中,从SDK android-sdks \\ extras \\ google \\ usb_driver \\ androidwinusb86中选择驱动程序并进行更新。然后,您可以在DDMS上找到移动设备。

Do the following : 请执行下列操作 :

1). 1)。 Download & install samsung Kies driver on your PC.( http://www.mkyong.com/android/where-to-download-samsung-galaxy-s2-usb-driver/ ) 在PC上下载并安装三星Kies驱动程序。( http://www.mkyong.com/android/where-to-download-samsung-galaxy-s2-usb-driver/

2). 2)。 Turn on USB debugging on your device: Settings -> Applications ->Development -> USB debugging 打开设备上的USB调试:设置->应用程序->开发-> USB调试

3). 3)。 Connect your samsung galaxy with the PC. 将三星银河与PC连接。

5). 5)。 Run the app mannually (Select the device at runtime). 手动运行该应用程序(在运行时选择设备)。

Log cat is used trace the errors: 日志猫用于跟踪错误:

If logcat is not visible go to Window -> show view -> other -> android -> log cat 如果logcat不可见,请转到“窗口”->“显示视图”->“其他”->“ android”->“ log cat”

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

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