Hey, you, yes you, desperate developer, who’s using Genymotion, Xamarin Android Player or something similar, that was just working but now you can’t connect your IDE to it for no apparent reason, have you experience one of the following problems?
(Exception in IDE) Timeout waiting for device
(Exception in IDE) Can't find devices
If your answer is yes to any of the above (or similar), then brace yourself, for 0.00€ you’ll have your problem solved, that’s correct, 0.00€, no credit card required AND, if you do this in the next 5 minutes, you won’t just stop being desperate but, you’ll be overall awesome instead ! (i.e., until you compile your program and find a bucket full of errors)
After struggling with this for days I found the source of the problem, it all comes down to updates! Momma always said, “Life is a box of updates, you never know what you gonna get“.
This will happen with any version but with me, it happened with Android SDK Platform-Tools rev 21 update to be more precise, see, this update brings a new version of Android Device Bridge (ADB), 1.0.32. If you’re currently using Xamarin Android Player or Genymotion, they come packed with a standalone flavor of ADB version 1.0.31. Since ADB is built to only have one single instance running and kill existent instance if the versions differ (regardless if it’s newer or not), when you try to run your app through the IDE – which is setup to use your Android SDK (that has the newer ADB), ADB will report the “deamon is out of date. Killing” message and terminate the ADB where your emulator is connected, leaving it unbound to any ADB, hence, virtually disconnected.
Downgrade Android SDK Platform-tools to rev20. I haven’t found a way to do this in the SDK Manager but, you can find the files online, google it up. NOTE: Delete or move the platform-tools rev21 folder, don’t rename it as it will still be picked by Xamarin Studio for instance.
2. Ask and wait for an emulator update
Ask your emulator provider for a tools update. I for one don’t believe in downgrading but, in this case it’s just easier.
You may also try to create a script that will automatically connect emulators to the running ADB but, is it really necessary?
On another note
Are you developing with Xamarin Android/iOS? Comment with your thoughts on the product !