Xamarin.Forms : Common Blank App Errors Solved

Wednesday, December 28, 2016

Xamarin.Forms is the great product from Xamarin and Microsoft but every time I need to create new project I am a little scared to be honest. I have problem with NuGet packages in .Droid project since the beginning of my Xamarin.Forms learning. So these days I think that I found the answer to these errors and I want to solve them in this blog post.

I will create new Xamarin.Forms App in this case Blank (XAML) PCL App:

Now when everything is ready like this:

We can build our App:

As soon as build ends we have common errors, errors like this: 'Xamarin.Android.Support.v7.RecyclerView.dll' and similar to them like this:

First time when this happened I was confused: "How does empty app can have error without any code added".

So I was trying a lot of solutions in properties, changing a framework version number and other stuff and solution that I found is very simple and it is inside of nuget packages.


All you need to do is to delete/uninstall all nuget packages in .Droid with some order and than delete Xamarin.Forms from .Droid and it will add correct nuget packages with correct version number.

Right click on .Droid project -> Manage NuGet packages:

Uninstall packages with this order:

  • Xamarin.Android.Support.v7.MediaRouter
  • Xamarin.Android.Support.v7.CardView
  • Xamarin.Android.Support.Design
  • Xamarin.Android.Support.v7.AppCompat
  • Xamarin.Android.Support.v4
  • Xamarin.Forms
No when under "Installed" tab you don't have any packages, go to "Browse" and type Xamarin.Forms:

Choose last stable one and click Install:

Click OK and wait couple of seconds to finish the installation.

After this rebuild your solution and you will see that errors are gone.

I hope that this tutorial was helpful for you and that you are solve your problem with this nuget packages bug/error/issue call it how do you want.

FYI: This works both for PCL and Shared projects.

I was struggling with this for a long time, the solution to the problem was to create new XAML App Master-Detail in VS 2017 RC and it will somehow make solution with correct nuget packages and this is way more handy way to solve it.

Best regards! Almir Vuk 

You Might Also Like