设置 Xamerin 项目后,我想编写测试用例。当我运行以下测试用例时,我看到应用程序在设备上启动。然后我执行以下测试:
[Test]
public void A_Show_Repl()
{
// Invoke the REPL so that we can explore the user interface
app.Repl();
}
这样做是为了探索 View 树,以便编写进一步的测试。但是,我只看到终端打开并出现以下错误:
Minhs-Air-2:~ mkn$ /usr/bin/mono "/var/folders/j4/tqn26ftj31l_xn7q71qywkt80000gn/T/uitest/repl/xut-repl.exe" android "/Users/mkn/Programming/Test/MyTest/MyTest.UITests/bin/Release/Xamarin.UITest.dll" "http://127.0.0.1:60398/" "5be7ab7369ad7e8292082a01da1506ca"
-bash: /usr/bin/mono: No such file or directory
看起来它正在错误的文件夹中搜索单声道。我可以在我的 mac 上的/usr/local/bin 中找到 mono。有没有办法在 Xamarin Studio 中解决这个问题?
最佳答案
将 Xamarin.UITest nuget 包升级到最新版本为我解决了这个问题。
关于Mac 上的 Xamarin 出现错误 :/usr/bin/mono: No such file or directory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32580701/