ios - 在 Visual Studio 2015 上安装 iOS 应用程序时出现问题抛出 Xamarin Mac Agent

标签 ios xamarin visual-studio-2015 xamarin.ios mono

尝试调试我的应用程序时,我在 Visual Studio 2015 中遇到问题,抛出 Xamarin Mac Agent(MacInCloud)。

这是 VS2015 中输出的日志:

Launch failed. The app 'TodoREST.iOS' could not be launched on 'iPhone 5s iOS 10.1'. Error: An error occured on client IDB420719 while executing a reply for topic xvs/idb/4.2.0.719/launch-app.

这也是 Xamarin 通过 VS 提供的日志:

Xamarin.VisualStudio.IOS.IdbClient Error: 0 : [2016-11-07 20:41:48.4612] Launch failed. The app 'TodoREST.iOS' could not be launched on 'iPhone 5s iOS 10.1'. Error: An error occured on client IDB420719 while executing a reply for topic xvs/idb/4.2.0.719/launch-app. Please check the logs for more details. System.ArgumentOutOfRangeException: StartIndex cannot be less than zero. Parameter name: startIndex at System.String.Substring (System.Int32 startIndex, System.Int32 length) [0x0009c] in /private/tmp/source-mono-4.6.0-c8sr0/bockbuild-mono-4.6.0-branch-c8sr0/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/string.cs:1266 at System.String.Substring (System.Int32 startIndex) [0x00000] in /private/tmp/source-mono-4.6.0-c8sr0/bockbuild-mono-4.6.0-branch-c8sr0/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/string.cs:1232 at Xamarin.Messaging.IDB.MTouch.GetMTouchError (System.String message) [0x0003c] in :0 at Xamarin.Messaging.IDB.MTouch+d__8.MoveNext () [0x00233] in :0 --- End of stack trace from previous location where exception was thrown ---

image of vs after crash

更多细节:应用程序在模拟器中打开后会立即自动关闭。

谢谢!

最佳答案

我也刚遇到这个错误。根据过去的经验,iOS 的部署问题通常与 Xamarin 版本在 Visual Studio/Windows 和您的 Mac 构建主机之间不同步有关。

确保您已在 Windows 机器和 Mac 上安装了来自稳定 channel 的最新更新。

在 Visual Studio 中,选择“工具”>“选项”>“Xamarin”>“其他”,然后选择“立即检查

在 Mac 上的 Xamarin Studio 中,从菜单栏中选择 Xamarin Studio 社区,然后检查更新...

我有一些待更新,这对我有用。

关于ios - 在 Visual Studio 2015 上安装 iOS 应用程序时出现问题抛出 Xamarin Mac Agent,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40476816/

相关文章:

ios - 出现红线错误 "Thread 1: signal SIGTERM"时如何调试

c# - Xamarin.Forms (droid build) MultiDex 选项导致应用程序崩溃

ios - Xamarin AppDelegate 在初始化好的 Dynamics 时没有实现 UIApplicationDelegate

c# - 在具有 EF core 的 Nuget 类库上使用 .NET 4.6.1 进行编译时出错

ios - UIButton 在 UIImageView 下不可点击(swift)

objective-c - 获取编译器错误预期标识符/预期方法主体

iphone - 如果在 addSubView 之后调用,UIButton 不会移动

mono - 构建失败。找不到类型 'System.Globalization.SortVersion'

c++ - boost.thread - 一个简单示例中的访问冲突

c# - 链接到 C# GUI 的 C++ 程序