尝试运行Xamarin.UITest时无法执行adb.exe

时间:2018-02-20 10:04:40

标签: xamarin.android xamarin.uitest

我正试图设置一个Xamarin UITest而没有任何运气。

当我尝试运行'所有测试'时,我收到以下错误:

execute: C:\Users\Brandon\AppData\Local\Android\android-sdk\platform-tools\adb.exe devices - exit code: 1
error: could not install *smartsocket* listener: cannot bind to 127.0.0.1:5037: Only one usage of each socket address (protocol/network address/port) is normally permitted. (10048)
List of devices attached
adb server version (39) doesn't match this client (36); killing...
could not read ok from ADB Server
* failed to start daemon *
error: cannot connect to daemon

ADB似乎开始很好,奇怪的是,它似乎是使用来自其他用户的adb版本,即使.. ..

1)工具>选项> Xamarin>对于Android SDK,Android设置为与上述不同的路径。

2)我找不到上面提到的adb.exe路径的系统环境路径变量!

我错过了什么吗?

1 个答案:

答案 0 :(得分:0)

在我的情况下,这是Android Emulator版本不匹配。模拟器以某种方式更新到较新的版本: enter image description here

卸载模拟器后,将Feed切换到Microsoft而不是google,然后重新安装模拟器-错误消失了,一切正常。