【问题标题】:Xamarin Forms iOS Deploy with simulator Failed To Install ERRORXamarin Forms iOS Deploy with Simulator Failed To Install 错误
【发布时间】:2016-10-24 11:04:07
【问题描述】:

我在 mac 上安装了 xamarin 并按照此处的说明允许远程登录(以便我可以在我的 windows 机器上使用模拟器),我能够通过 mac 代理连接没有问题,但是当我运行时我得到这个错误:

想知道你们中是否有人遇到过这些问题?

当我在我的 MAC 上的 xamarin Studio 中创建一个解决方案并在 MAC 上运行该应用程序时,它可以正常工作而没有给出任何错误...任何可能有帮助的想法?

更新 来自 MAC 的日志:

[2016-06-22 15:25:21.5] PERF:      - Bridge loaded in 358.017ms
[2016-06-22 15:25:21.5] PERF: Total time for bootstrapping process: 413ms
[2016-06-22 15:25:21.5] ERROR: com.xamarin.MTHosting.cb5bcd1: InstallAndLaunch (attempt 3): System.IO.DirectoryNotFoundException: /Users/Christian Agius/Library/Caches/Xamarin/mtbs/builds/DAAppiOS/6a5cceef9b57993d401c68f8154370ef/bin/iPhoneSimulator/Debug/DAAppiOS.app
 at MonoTouch.Hosting.Session.InstallApplication (System.String bundlePath) <0x87438e0 + 0x00213> in <filename unknown>:0 
 at MonoTouch.Hosting.Session.InstallAndLaunch (System.String appBundlePath, System.String[] appArgs) <0x87435e8 + 0x00047> in <filename unknown>:0 
[2016-06-22 15:25:21.5] ERROR: com.xamarin.MTHosting.cb5bcd1: InstallAndLaunch (attempt 4): System.IO.DirectoryNotFoundException: /Users/Christian Agius/Library/Caches/Xamarin/mtbs/builds/DAAppiOS/6a5cceef9b57993d401c68f8154370ef/bin/iPhoneSimulator/Debug/DAAppiOS.app
 at MonoTouch.Hosting.Session.InstallApplication (System.String bundlePath) <0x87438e0 + 0x00213> in <filename unknown>:0 
 at MonoTouch.Hosting.Session.InstallAndLaunch (System.String appBundlePath, System.String[] appArgs) <0x87435e8 + 0x00047> in <filename unknown>:0 
system: Jun 22 15:25:21 Christians-MacBook-Pro distnoted[10419]: # distnote server daemon  absolute time: 13226.136720649   civil time: Wed Jun 22 15:25:21 2016   pid: 10419 uid: 501  root: yes
Jun 22 15:25:21 Christians-MacBook-Pro locationd[10409]: BLP: Need a bundle path or a bundle identifier.
System.AggregateException: One or more errors occurred. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: src
 at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal:copy_from_unmanaged (intptr,int,System.Array,int)
 at System.Runtime.InteropServices.Marshal.Copy (IntPtr source, System.Byte[] destination, Int32 startIndex, Int32 length) <0x1a89fe0 + 0x00032> in <filename unknown>:0 
 at Xamarin.Simulator.Server.ScreenManager+<OnDisplayUpdated>c__AnonStorey0.<>m__0 (Int32 i) <0x8740140 + 0x000e7> in <filename unknown>:0 
 at System.Threading.Tasks.Parallel+<ForWorker>c__AnonStorey3`1[TLocal].<>m__1 () <0x1b833d0 + 0x00318> in <filename unknown>:0 
 --- End of inner exception stack trace ---
 at System.Threading.Tasks.Task.ThrowIfExceptional (Boolean includeTaskCanceledExceptions) <0x1955280 + 0x00049> in <filename unknown>:0 
 at System.Threading.Tasks.Task.Wait (Int32 millisecondsTimeout, CancellationToken cancellationToken) <0x1956a70 + 0x000c8> in <filename unknown>:0 
 at System.Threading.Tasks.Task.Wait () <0x1956890 + 0x00033> in <filename unknown>:0 
 at System.Threading.Tasks.Parallel.ForWorker[TLocal] (Int32 fromInclusive, Int32 toExclusive, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action`1 body, System.Action`2 bodyWithState, System.Func`4 bodyWithLocal, System.Func`1 localInit, System.Action`1 localFinally) <0x194a680 + 0x00688> in <filename unknown>:0 
---> (Inner Exception #0) System.ArgumentNullException: Value cannot be null.
Parameter name: src
 at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal:copy_from_unmanaged (intptr,int,System.Array,int)
 at System.Runtime.InteropServices.Marshal.Copy (IntPtr source, System.Byte[] destination, Int32 startIndex, Int32 length) <0x1a89fe0 + 0x00032> in <filename unknown>:0 
 at Xamarin.Simulator.Server.ScreenManager+<OnDisplayUpdated>c__AnonStorey0.<>m__0 (Int32 i) <0x8740140 + 0x000e7> in <filename unknown>:0 
 at System.Threading.Tasks.Parallel+<ForWorker>c__AnonStorey3`1[TLocal].<>m__1 () <0x1b833d0 + 0x00318> in <filename unknown>:0 <---

system: Jun 22 15:25:21 --- last message repeated 1 time ---
Jun 22 15:25:21 Christians-MacBook-Pro CoreSimulatorBridge[10414]: Request received to remove pairs that are no longer paired by the host.
        hostPairedArray = (
    )
        simPairedArray=(
    )
        unpairArray=(
    )

【问题讨论】:

  • 请查看 iOS 日志以获取更多详细信息并在此处发布。仅凭此错误消息无法确定发生了什么。
  • 我正在跟进这个,我认为它相关forums.xamarin.com/discussion/16770/…

标签: ios xamarin.ios xamarin.forms


【解决方案1】:

我也遇到了同样的问题。在搜索了 4 小时的解决方案后......并阅读了所有 Internet 都没有结果,我发现问题是在 Mac 机器上的用户帐户配置中,您有不同的 NAME ACCOUNT 和 FULL NAME ACCOUNT。 这 2 个字段必须以相同的名称归档。 否则,来自 VS iosEMualtor 的路径不匹配(需要全名)。

为此,只需按照此 Apple-KB-Article 的步骤操作:https://support.apple.com/en-us/HT201548(如下所示的优胜美地说明)

  1. 选择 Apple 菜单  > 系统偏好设置,然后单击用户和组。
  2. 单击锁定按钮,然后输入管理员名称并 密码。
  3. 从用户列表中,按住 Control 键单击或右键单击要重命名的用户。从快捷菜单中选择“高级选项”。
  4. 在“全名”字段中更改名称,然后单击“确定”。

【讨论】:

  • 谢谢它很有帮助。我发现没有必要将“帐户名称”和“全名”命名相同。事实上:从 VS 连接 mac 时不要使用“全名” ==> 使用“帐户名”,现在远程调试仍然有效,并且.... iOs 模拟器也有效 :)
【解决方案2】:

我昨天在 mac 和 windows 上将 xamarin 更新到最新版本时收到此错误。我能够在mac上运行模拟器,但不能在windows上运行。我通过将iso模拟器安装到windows上的预览版来修复它,远程模拟器再次工作。 iOS Simulator (for Windows)

【讨论】:

    【解决方案3】:
    1. 删除文件夹 /Users/xxxx/Library/Caches/Xamarin/mtbs/builds/ProjectName(在 Mac 上)
    2. 重建项目
    3. 在simulatorPhone 上运行调试

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-16
      • 2017-04-04
      • 2018-11-30
      • 2017-04-09
      • 1970-01-01
      相关资源
      最近更新 更多