最近下载了Genymotion模拟器来用用,确实是快多了。
但是,最近打开AndroidStudio后,总是弹出以下的错误:
Unable to establish a connection to adb. This usually happens if you have an incompatible version of adb running already. Try re-opening Studio after killing any existing adb daemons. If this happens repeatedly, please file a bug at http://b.android.com including the following: 1. Output of the command: 'D:\Program Files\Android\Android\sdk\platform-tools\adb.exe devices' 2. Your idea.log file (Help | Show Log in Explorer)
原因分析:
因为有两个不同AndroidSDK路径,Genymotion模拟器使用自带的sdk,与AndroidStudio的sdk路径不同,导致开启模拟器后不能启动adb.exe。
解决方法:
打开
点击Settings
设置ADB选项
点击OK,然后重启AndroidStudio即可。