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
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.
CodePudding user response:
- 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.
- According to the tips of these two libraries, you need to ensure that your Android version is 9.