[英]Could not load assembly on Xamarin.Forms?
在重建我的android項目時,它顯示此錯誤:
System.IO.FileNotFoundException: Could not load assembly 'Xamarin.Android.Support.Fragment,
Version=1.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?
然后我安裝了“ Xamarin.Android.Support.Fragment”,但安裝失敗並顯示此錯誤:
Unable to resolve dependencies. 'Xamarin.Android.Support.v4 23.3.0' is not compatible with
'Xamarin.Android.Support.Design 23.3.0 constraint: Xamarin.Android.Support.v4 (= 23.3.0)',
'Xamarin.Forms 2.5.0.91635 constraint: Xamarin.Android.Support.v4 (>= 25.4.0.2)'
如何解決這個問題呢?
我正在使用API版本15(Android 4.0.3)。 安裝API版本25(Android 7.1)后,它會顯示相同的錯誤。
看來新的NuGet軟件包是MonoAndroid80內置的。 您可能需要將“編譯使用”選項更改為最新的Android版本。
為此,通過右鍵單擊項目節點並選擇“屬性”,進入Android項目屬性。 在“應用程序”下,將“使用Android版本編譯”設置為適當的版本或最新版本。 在Visual Studio中顯示。
如果您要查找的版本不存在,請通過Android SDK Manager安裝較新的SDK版本。
另請參閱此鏈接
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.