2017-08-21 81 views
0

我在一個窗口中啓動了VS 2017中的新Xamarin跨平臺項目。 Android部分工作正常,但是當我嘗試打開iOS Main.Storyboard文件時,出現錯誤。我連接到有xcode 8.3的mac。Xamarin VS 2017無法渲染iOS故事板文檔

Xamarin.iOS版本的VS窗口 - 在VS 2017年社區10.4.0.123

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()<--- 

編輯解決方案

對於有同樣的問題的人,安裝Xamarin更新擴展VS &更新Xamarin蘋果SDK固定爲我這個問題。按照步驟here

回答

1

更新到最新版本修復了它。

另外,在Windows上使用Visual Studio 2017時,我遇到了同樣的問題。 升級Xamarin(mac上的穩定頻道&窗口)並更新Visual Studio 2017到最新版本(15.0.26228.12)爲我解決了它。

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

+0

雖然我沒有看到升級xamarin的方法。文檔只是告訴你更新Visual Studio(我做過).https://developer.xamarin.com/guides/ios/getting_started/installation/windows/ – jdoyle1331

0

我最好這個問題的建議是NEVER使用IOS designer。這是垃圾。始終使用Xcode Interface Builder。主要原因是,你保證故事板將在IOS中有效。我曾經在IOS Designer中創建了一個空的故事板,並將它生成的XML與在Xcode中創建的空故事板進行了比較。它完全不同。設計師版本錯過了許多信息。從那以後,我從來不信任IOS設計師。不僅如此,在iOS設計器上使用約束是一種痛苦,因此在Xcode中它們更容易。如果佈局非常複雜,我也會在IOS設計器中使用故事板渲染完全錯誤。