首页 文章

Xamarin VS 2017无法呈现iOS故事板文档

提问于
浏览
0

我在VS 2017的Windows上开始了一个新的Xamarin跨平台项目 . android部分工作正常,但是当我尝试打开iOS Main.Storyboard文件时,我收到错误 . 我连接到一个有xcode 8.3的mac .

Windows VS上的Xamarin.iOS版本 - 10.4.0.123

在VS社区2017上的Xamarin iOS版本在mac - 10.12.0.18

除了降级xcode之外,我找不到任何答案 . 我认为这个问题可能与Xamarion.iOS版本不匹配有关,但我无法弄清楚如何解决这个问题 . 任何帮助是极大的赞赏!!

完整错误日志:

System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: The returned remote SDK entries are invalid
   at MonoTouch.Design.Client.IosSdkTarget.InitializeLocalFileStore()
   at MonoTouch.Design.Client.IosSdkTarget..ctor(Version xcodeVersion, DataPackEntry[] datapack, String storeDirectory)
   at MonoTouch.Design.Client.IPhoneDesignerSession.<SetupSession>d__257.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at MonoTouch.Design.Client.IPhoneDesignerSession.<>c__DisplayClass256_0`1.<EnsureSession>b__0()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MonoTouch.Design.Client.IPhoneDesignerSession.<RenderXmlWithPartialReloadRetry>d__175.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at MonoTouch.Design.Client.IPhoneDesignerSession.<RenderXmlWithPartialReloadRetry>d__175.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MonoTouch.Design.Client.IPhoneDesignerSession.<RenderXml>d__174.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at MonoTouch.Design.Client.IPhoneDesignerSession.<RenderXml>d__174.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at MonoTouch.Design.Client.IPhoneDesignerSession.<ReloadItemsAsync>d__170.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MonoTouch.Design.Tasks.<Cancellable>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MonoTouch.Design.Client.IPhoneDesignerSession.<ReloadItems>d__169.MoveNext()
---> (Inner Exception #0) System.InvalidOperationException: The returned remote SDK entries are invalid
   at MonoTouch.Design.Client.IosSdkTarget.InitializeLocalFileStore()
   at MonoTouch.Design.Client.IosSdkTarget..ctor(Version xcodeVersion, DataPackEntry[] datapack, String storeDirectory)
   at MonoTouch.Design.Client.IPhoneDesignerSession.<SetupSession>d__257.MoveNext()<---


Contents of C:\Users\Jdoyle\AppData\Local\Xamarin\Logs\15.0\iOSDesigner-11168.2017-08-21__16-14-59.log:
MDAddinsHash: 1363a8d943bab7700c93a97474060b6734aa7f94

[2017-08-21 16:17:10.2] INFO: Starting full reload...
[2017-08-21 16:17:10.8] INFO: Reloading: Serialization took 0ms
[2017-08-21 16:17:30.4] INFO: Reloading: Deserialization took 13ms
[2017-08-21 16:17:30.4] INFO: Reloading: Server rendering completed in 19520ms with 52744 bytes
[2017-08-21 16:17:30.4] ERROR: EnsureSession (counter 1): System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: The returned remote SDK entries are invalid
   at MonoTouch.Design.Client.IosSdkTarget.InitializeLocalFileStore()
   at MonoTouch.Design.Client.IosSdkTarget..ctor(Version xcodeVersion, DataPackEntry[] datapack, String storeDirectory)
   at MonoTouch.Design.Client.IPhoneDesignerSession.<SetupSession>d__257.MoveNext()
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.InvalidOperationException: The returned remote SDK entries are invalid
   at MonoTouch.Design.Client.IosSdkTarget.InitializeLocalFileStore()
   at MonoTouch.Design.Client.IosSdkTarget..ctor(Version xcodeVersion, DataPackEntry[] datapack, String storeDirectory)
   at MonoTouch.Design.Client.IPhoneDesignerSession.<SetupSession>d__257.MoveNext()<---

Edit Solution

对于任何有同样问题的人,安装VS的Xamarin更新扩展并更新Xamarin Apple SDK为我解决了这个问题 . 按照步骤here进行操作 .

2 回答

  • 0

    更新到最新版本会修复它 .

    此外,在Windows上使用Visual Studio 2017时,我遇到了同样的问题 . 升级Xamarin(mac和windows上的稳定通道)并将Visual Studio 2017更新到最新版本(15.0.26228.12)为我修复了它 .

    see: [https://releases.xamarin.com/technical-bulletin-xcode-8-3-support-for-vs-2017/][1]

  • 0

    我对这个问题的最好建议是 NEVER 使用 IOS designer . 它保证故事板对IOS有效 . 我曾经在IOS Designer中创建了一个空的故事板,并将它生成的XML与在Xcode中创建的空故事板进行了比较 . 这完全不同 . 设计师版本缺少大量信息 . 从那以后,我从未信任过IOS设计师 . 不仅如此,但是限制是在IOS设计师上使用的麻烦,因此,如果布局特别复杂,他们也会在IOS设计师中使故事板呈现完全错误 .

相关问题