簡體   English   中英

帶有用於Android的自定義渲染器的Xamarin.Forms會產生編譯器錯誤

[英]Xamarin.Forms with custom renderer for Android yields compiler error

升級到Xamarin.Forms 1.2.3后,我收到與自定義渲染器的定義有關的以下編譯器錯誤:

Error CS0012: The type `Xamarin.Forms.Platform.Android.FormsViewGroup' is
defined in an assembly that is not referenced. Consider adding a reference to
assembly `FormsViewGroup, Version=1.2.3.0, Culture=neutral,
PublicKeyToken=null' (CS0012) (XFormsNavigation.Android)

有什么問題,我該如何解決?

不確定,為什么必須手動添加Xamarin.Forms庫。 但是,這是怎么做的:

packages/Xamarin.Forms.1.2.3.6256-pre4/lib/MonoAndroid10/ (或類似的版本,具體取決於您的Xamarin.Forms版本)中,您將找到FormsViewGroup.dll庫。 將其添加到您的Android項目的引用中,然后進行編譯。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM