Troubleshooting

PDF for offline use

Let us know how you feel about this

Translation Quality


0/250

last updated: 2016-02

Common error conditions and how to resolve them

Error: "Unable to find a version of Xamarin.Forms compatible with..."

The following errors can appear in the Package Console window when updating all the Nuget packages in a Xamarin.Forms solution or in a Xamarin.Forms Android app project:

Attempting to resolve dependency 'Xamarin.Android.Support.v7.AppCompat (= 23.3.0.0)'.
Attempting to resolve dependency 'Xamarin.Android.Support.v4 (= 23.3.0.0)'.
Looking for updates for 'Xamarin.Android.Support.v7.MediaRouter'...
Updating 'Xamarin.Android.Support.v7.MediaRouter' from version '23.3.0.0' to '23.3.1.0' in project 'Todo.Droid'.
Updating 'Xamarin.Android.Support.v7.MediaRouter 23.3.0.0' to 'Xamarin.Android.Support.v7.MediaRouter 23.3.1.0' failed.
Unable to find a version of 'Xamarin.Forms' that is compatible with 'Xamarin.Android.Support.v7.MediaRouter 23.3.0.0'.

What causes this error?

Xamarin Studio (or Visual Studio) may indicate that updates are available for the Xamarin.Forms Nuget packge and all its dependencies. In Xamarin Studio, the solution's Packages node might look like this (the version numbers might be different):

If all the packages are updated, this error will occur.

Xamarin.Forms is configured to depend on specific versions of the support libraries and Google Play Services. Although the IDE indicates that new versions of the Xamarin.Android.Support packages are available, Xamarin.Forms isn't necessarily compatible with those new versions.

This occurs because each version of Xamarin.Forms is 'locked' to support only a specific version of the other packages (in this case, 23.3.0.0). Even though a newer version is available (eg. 23.3.1.0), Xamarin.Forms update cycle differs from the Android packages' update cycle, and it won't necessarily be compatible with the new version.

The correct way to update is to right-click only on the Xamarin.Forms package and choose Update. Do not update all packages in the project or solution – if you do the above error will occur.
Other packages that you have added to your project may also be updated individually, as long as they don't cause the Xamarin.Android.Support packages to update.

Fix: Remove all packages, and re-add Xamarin.Forms

If the Xamarin.Android.Support packages have been updated to incompatible versions, the simplest fix is to:

  1. Manually delete all the Nuget packages in the Android project, then
  2. re-add the Xamarin.Forms package.

This will automatically download the correct versions of the other packages.

To see a video of this process, refer to this forums post.

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.