Version conflict detected for Xamarin.Android.Support.Compat.

SreeeeSreeee INMember ✭✭✭✭✭

Getting below error in my visual studio.

Severity    Code    Description Project File    Line    Suppression State
Error   NU1107  Version conflict detected for Xamarin.Android.Support.Compat. Install/reference Xamarin.Android.Support.Compat 28.0.0.1 directly to project MyProject.Android to resolve this issue. 
 MyProject.Android -> MyProject -> Xamarin.Essentials 1.2.0 -> Xamarin.Android.Support.Compat (>= 28.0.0.1) 
 MyProject.Android -> Xamarin.Android.Support.Design 27.0.2.1 -> Xamarin.Android.Support.Compat (= 27.0.2.1).   

I tried to install the Xamarin.Android.Support.Compat 28.0.0.1 to my android project. It also ended up with another error.

Severity    Code    Description Project File    Line    Suppression State
Error   NU1107  Version conflict detected for Xamarin.Android.Support.Core.Utils. Install/reference Xamarin.Android.Support.Core.Utils 28.0.0.1 directly to project MyProject.Android to resolve this issue. 
 MyProject.Android -> MyProject -> Xamarin.Essentials 1.2.0 -> Xamarin.Android.Support.Core.Utils (>= 28.0.0.1) 
 MyProject.Android -> Xamarin.Android.Support.Design 27.0.2.1 -> Xamarin.Android.Support.Core.Utils (= 27.0.2.1).   

So I tried to install the Xamarin.Android.Support.Core.Utils 28.0.0.1 but it again redirects me to the first error. How can I fix this error, because of this error I can't add new NuGet packages to my project.

Best Answers

  • DirkWilhelmDirkWilhelm US ✭✭✭✭
    Accepted Answer

    Looks like you need to update all Xamarin.Android.Support nugets to 28.0.0.1, either by using the nuget manager in visual studio or by editing your android csproj

  • SreeeeSreeee IN ✭✭✭✭✭
    Accepted Answer

    @DirkWilhelm Updated the android project .csproj file like below and saved the file after the update.

    <PackageReference Include="Xamarin.Android.Support.Design" Version="28.0.0.1" />
    <PackageReference Include="Xamarin.Android.Support.v7.AppCompat" Version="28.0.0.1" />
    <PackageReference Include="Xamarin.Android.Support.v4" Version="28.0.0.1" />
    <PackageReference Include="Xamarin.Android.Support.v7.CardView" Version="28.0.0.1" />
    <PackageReference Include="Xamarin.Android.Support.v7.MediaRouter" Version="28.0.0.1" />
    

Answers

  • DirkWilhelmDirkWilhelm USMember ✭✭✭✭
    Accepted Answer

    Looks like you need to update all Xamarin.Android.Support nugets to 28.0.0.1, either by using the nuget manager in visual studio or by editing your android csproj

  • SreeeeSreeee INMember ✭✭✭✭✭
    Accepted Answer

    @DirkWilhelm Updated the android project .csproj file like below and saved the file after the update.

    <PackageReference Include="Xamarin.Android.Support.Design" Version="28.0.0.1" />
    <PackageReference Include="Xamarin.Android.Support.v7.AppCompat" Version="28.0.0.1" />
    <PackageReference Include="Xamarin.Android.Support.v4" Version="28.0.0.1" />
    <PackageReference Include="Xamarin.Android.Support.v7.CardView" Version="28.0.0.1" />
    <PackageReference Include="Xamarin.Android.Support.v7.MediaRouter" Version="28.0.0.1" />
    
  • JarvanJarvan Member, Xamarin Team Xamurai
    edited August 2019

    @Sreeee
    Try to uninstall Xamarin.Essentials package. Then update the Xamarin.Android.Support packages to 28.0.0.1. After updating the packages, reinstall Xamarin.Essentials 1.2.0.

  • SreeeeSreeee INMember ✭✭✭✭✭
    //Updated the android project .csproj file like below and saved the file after the update.
    <PackageReference Include="Xamarin.Android.Support.Design" Version="28.0.0.1" />
    <PackageReference Include="Xamarin.Android.Support.v7.AppCompat" Version="28.0.0.1" />
    <PackageReference Include="Xamarin.Android.Support.v4" Version="28.0.0.1" />
    <PackageReference Include="Xamarin.Android.Support.v7.CardView" Version="28.0.0.1" />
    <PackageReference Include="Xamarin.Android.Support.v7.MediaRouter" Version="28.0.0.1" />
    

    @Jarvan Solved the problem by this approach, anyway thanks for your suggestion :)

Sign In or Register to comment.