Xamarin.Android.Support.v4 build exception

I am working on a visual studio with Xamarin.Forms , I get the following error:

Exception when loading assemblies: System.IO.FileNotFoundException: Failed to load assembly "Xamarin.Android.Support.v4, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = '. Perhaps this does not exist in Mono for the Android profile? File name: 'Xamarin.Android.Support.v4.dll' in Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve (AssemblyNameReference links, ReaderParameters parameters) on Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences (ICollection`1 assembly, Boolean topLevel) in Xamarin.Android.Tasks.ResolveAssemblies.Execute () SportBook.Droid

What should I do?

+7
c # visual-studio portable-class-library xamarin xamarin.forms
source share
3 answers

Go to NuGet and update the Xamarin Android-v4 support library, and in some cases you also need to update the Xamarin.Forms library. For more information check the following link:

https://forums.xamarin.com/discussion/26685/xamarin-forms-filenotfoundexception-xamarin-android-support-v4

enter image description here

+10
source share

Try deleting files in

{Win Drive}: \ Users \ {your username} \ AppData \ Local \ Xamarin \ zips

AppData may be a hidden folder!

Rebuild your application. Xamarin will automatically download the necessary files. You can wait 10-20 minutes :) be patient.

And try downloading all the Android packages through the "SDK Manager", which is located on the toolbar of the visual studio; if you’re targeting an uninstalled version of the SDK.

+1
source share

Please add the following data to your list to fix the problems.

Recover Nuget Packages

This problem occurs due to bad data and duplication inside the package folder. Delete all packages inside the package folder and restore them in Visual Studio by clicking the Restore Nuget Packages button.

0
source share

All Articles