Home > OS >  MediaRouter and Palette not compatible with NetStandard2.1
MediaRouter and Palette not compatible with NetStandard2.1

Time:09-29

Please help! I'm trying to run my IOS xamarin app and have the following Android error:

code PackageReference Include="Xamarin.AndroidX.MediaRouter" Version="1.2.5" PackageReference Include="Xamarin.AndroidX.Palette" Version="1.0.0.8" code

If I remove them then I receive this error that they are required when I run in Android.

What should I do?

CodePudding user response:

If you are running an iOS app, you shouldn't get an Android message, unless you accidentally added that Nuget package to your iOS solution

Check all the Nuget of the solution

enter image description here

Go to those Android packages.

If you check the right panel, you should see that those packages only have a version in the Android project. You should remove them from your shared or iOS project without problem.

enter image description here

CodePudding user response:

  1. Make sure that "Xamarin.AndroidX.MediaRouter" and "Xamarin.AndroidX.Palette" only exist in Nuget of Android. If these two libraries are not used, delete these two libraries in all directories.
  2. According to the tips of these two libraries, you need to ensure that your Android version is 9.
  • Related