简体   繁体   中英

Android adb.exe crashes - Only when called from Eclipse (win7 32)

ADB when run stand-alone works fine. I can connect to my device (HTC Desire) and perform .apk installs etc, so I know the USB drivers are working correctly. A common reason for this question, I know, but that can be ruled out.

Occasionally I can connect to the phone, very occasionally. 99% of the time I just get the standard windows popup "adb.exe has stopped working".

I've updated Eclipse to the latest version. I'm sure the USB drivers are working correctly I can connect via adb in command line mode with no issues. I've searched for a solution until google begged me to stop :)

Seems like a DDMS Eclipse issue. Any ideas ?

Actually, just before I sent this I had a brainwave. Without Eclipse running I ran adb.exe from command line and performed an install -r of my .apk package. All worked fine. I then started Eclipse - the connection to my phone worked fine...

Nope, Eclipse now failing again. BUT with eclipse trying to connect (and failing) I can simultaneously run adb from command line and install the package. It's got to be Eclipse

In my case, I had an instance of adb.exe from another package (Android-Sync) running. Processes with this file name are common in packages that sync devices. You can find more information about programs that use an adb.exe process here: What is adb.exe ? adb.exe info

To determine if you have an adb.exe process already running, look in your Task Manager on the Processes tab to find the running adb.exe. You can right-click and select Properties from the menu to find out the full path of the adb.exe.

To solve the problem and allow Eclipse access to the correct adb.exe, I shut down Eclipse and the emulator. Then I went into the Task Manager and shut down the running adb.exe. There may be more than one. Then I restarted Eclipse and the emulator. Fortunately, when I started my Android Virtual Device, that program was smart enough to start up the correct adb.exe.

In my case was kinda problem with USB driver. Just plug your phone always to the same USB port.

If you have an alternate "launcher" or "home-screen" installed, that might be forcing the connection to close. If you have one installed, either force stop it or uninstall it.

I've found that some apps running in your phone can cause ADB to crash for some reason. Try to close unnessecary apps running on your phone when developing in eclipse

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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