2017-08-20 55 views
0

我最近將解決方案更新爲Xamarin.Forms(2.3.4.267)的最新nuget包。現在,我收到一個異常,而我跑我在Android模擬器(X86)計劃Xamarin在UWP工作時形成Android NoSupportedException

Unhandled Exception: 

System.PlatformNotSupportedException: Operation is not supported on this platform. 

隨着這段代碼:

public virtual void AddRange(IEnumerable<T> collection) 
{ 
    if (collection == null) throw new ArgumentNullException(nameof(collection)); 

    foreach (var i in collection) Items.Add(i); 
    OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset)); 
} 

,特別是,行

foreach (var i in collection) Items.Add(i); 

這裏是一個github鏈接來測試問題 https://github.com/hugoterelle/posexclusive-droid-notsupported

+0

我不能轉載您的問題,請您發表更完整的代碼來重現此問題? –

+0

@ YorkShen-MSFT對於延遲抱歉,我需要時間清理解決方案以提供github回購。你可以在編輯的問題中找到它。 – hugoterelle

回答

1

這是非常類似於我在使用Xamarin Android時遇到的an issue。此問題已在release 15.3.2 of Xamarin上修復。

嘗試更新您的Xamarin版本,然後再試一次

+0

謝謝,這個更新是必要的! – hugoterelle

+0

不客氣!如果這解決了你的問題,請不要忘記賞金:) .. –

+0

我沒忘記,但你必須等待大約20個小時才能獎勵賞金:) – hugoterelle

相關問題