Mohamad Mahmoud Darwish
Mohamad Mahmoud Darwish

Reputation: 4173

Exception while loading assemblies Xamarin.Android.Support.v4

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

Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile? File name: 'Xamarin.Android.Support.v4.dll' at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters) at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(ICollection`1 assemblies, AssemblyDefinition assembly, Boolean topLevel) at Xamarin.Android.Tasks.ResolveAssemblies.Execute() SportBook.Droid

What should I do?

Upvotes: 11

Views: 22318

Answers (3)

Umut Bebek
Umut Bebek

Reputation: 394

Try to delete files under

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

AppData may be a hidden folder!

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

And try to download all android packages via 'SDK Manager' which is on the visual studio toolbar; if you are targeting a non-installed SDK version.

Upvotes: 1

Manbir Singh Rakhra
Manbir Singh Rakhra

Reputation: 1

Please add the following into your list to do to fix the issues.

Restore Nuget Packages

This problem is produced by bad data and duplication inside the packages folder. Please delete your all the packages inside the packages folder and restored in Visual Studio by click Restore Nuget Packages.

Upvotes: 0

Mohamad Mahmoud Darwish
Mohamad Mahmoud Darwish

Reputation: 4173

Go to NuGet and update Xamarin Android Support Library -v4 package, And in some cases you need also to update Xamarin.Forms Library, For more info check the following link:

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

enter image description here

Upvotes: 11

Related Questions