Android Studio Problems? Check ADB

Published 2/18/2018, Last Updated 2/18/2018 by Joe Cieslik

Back

Introduction

Developers enjoy complaing about Android Studio. Some of this griping is warranted, Studio uses a nice chunk of system resources and can be frightening to beginners. The other biggest complaint and the one we'll be partially addressing today is mysterious errors or faults. I primarily experience this particular bug when I click Run Selected Configuration or when I leave the Android device emulator open for at least a couple of hours. Android Debug Bridge will start spawning processes infinitely until it is killed or my machine runs out of RAM. I've only encountered this issue on Windows so I'll only be addressing fixing this in a Windows specific manner. However finding and killing processes on OSX or *nix is a man page away if this afflicts your non-Windows machine.

The Fix

Diagnose your problem by checking the Windows Task Manager with Ctrl + Shift + Esc, check the Processes tab, and sort by Image Name. ADB should be at the top, if there is more than 1 or 2 instances of adb.exe and you are experiencing Android Studio freezing or system slow down it's time to kill ADB. Open cmd either by searching for it or use Windows + R and then type cmd. Once you have a shell type taskkill /F /IM adb.exe /T. Done, you've slain the beast! Now get back to browsing hacker news reading documentation while your code compiles. I'd like to note that this problem could be caused by multiple installed copies of ADB or something along those lines but this is not the case for me.