AndroidSupportComponents icon indicating copy to clipboard operation
AndroidSupportComponents copied to clipboard

Wrong version of Xamarin.Android.Support.Media.Compat referenced

Open jldubz opened this issue 6 years ago • 3 comments

Xamarin.Android Version (eg: 6.0):

MonoAndroid v9.0

Operating System & Version (eg: Mac OSX 10.11):

Windows 10 1803

Support Libraries Version (eg: 23.3.0):

Xamarin.Android.Support.Design (28.0.0.1)

Describe your Issue:

With Xamarin.Android.Support.Design (28.0.0.1) as the only reference NuGet package in my Xamarin.Android project, the project does not compile, giving me this error:

  Xamarin.Android.Support.Annotations.targets(17, 3): [null] Invalid Android Support Library Configuration
All installed Android Support library Nuget Packages must be the exact same version.

The following Xamarin.Android.Support.* packages and versions were detected:

    Xamarin.Android.Support.Media.Compat (26.0.2)
    Xamarin.Android.Support.Animated.Vector.Drawable (28.0.0.1)
    Xamarin.Android.Support.Annotations (28.0.0.1)
    Xamarin.Android.Support.AsyncLayoutInflater (28.0.0.1)
    Xamarin.Android.Support.Collections (28.0.0.1)
    Xamarin.Android.Support.Compat (28.0.0.1)
    Xamarin.Android.Support.CoordinaterLayout (28.0.0.1)
    Xamarin.Android.Support.Core.UI (28.0.0.1)
    Xamarin.Android.Support.Core.Utils (28.0.0.1)
    Xamarin.Android.Support.CursorAdapter (28.0.0.1)
    Xamarin.Android.Support.CustomView (28.0.0.1)
    Xamarin.Android.Support.Design (28.0.0.1)
    Xamarin.Android.Support.DocumentFile (28.0.0.1)
    Xamarin.Android.Support.DrawerLayout (28.0.0.1)
    Xamarin.Android.Support.Fragment (28.0.0.1)
    Xamarin.Android.Support.Interpolator (28.0.0.1)
    Xamarin.Android.Support.Loader (28.0.0.1)
    Xamarin.Android.Support.LocalBroadcastManager (28.0.0.1)
    Xamarin.Android.Support.Print (28.0.0.1)
    Xamarin.Android.Support.SlidingPaneLayout (28.0.0.1)
    Xamarin.Android.Support.SwipeRefreshLayout (28.0.0.1)
    Xamarin.Android.Support.Transition (28.0.0.1)
    Xamarin.Android.Support.v7.AppCompat (28.0.0.1)
    Xamarin.Android.Support.v7.CardView (28.0.0.1)
    Xamarin.Android.Support.v7.RecyclerView (28.0.0.1)
    Xamarin.Android.Support.Vector.Drawable (28.0.0.1)
    Xamarin.Android.Support.VersionedParcelable (28.0.0.1)
    Xamarin.Android.Support.ViewPager (28.0.0.1)

Please install v28.0.0.1 of all Xamarin.Android.Support.* NuGet packages.

As you can see, the first referenced package is for Xamarin.Android.Support.Media.Compat (26.0.2) which is what is causing the error. There are no other references to any Xamarin.Android.Support packages in this project. Adding a direct reference to Xamarin.Android.Support.Media.Compat (28.0.0.1) seems to resolve the issue, but this should still be documented and addressed at some point. I'm sure other people are encountering this issue

Steps to Reproduce (with link to sample solution if possible):

  1. Create a new Xamarin.Android project targeting MonoAndroid v9.0.
  2. Make sure there is no NuGet reference to Xamarin.Forms
  3. Add the Xamarin.Android.Support.Design (28.0.0.1) NuGet package to the project
  4. Build the project
  5. Build error

jldubz avatar May 07 '19 15:05 jldubz

This issue is so annoying. Especially given the Droid project is old csproj format.

weitzhandler avatar Jul 01 '19 04:07 weitzhandler

Hi there, I have the same issue.. I have updated VS2019 to the latest version (16.2.3) however, no luck... is there any update on this?

yma44 avatar Sep 04 '19 03:09 yma44

Enter "Install-Package Xamarin.Android.Support.v4 -Version 28.0.0.3" in Package manager console

developer23-commits avatar May 01 '20 14:05 developer23-commits