Xamarin Android: Hundreds of warnings saying to check if Nuget packages are compatible

11,733

Solution 1

This did got rid of the warnings:

  • update the Xamarin Extentions
  • clean solution
  • build solution

Result: all the the warnings are gone but Resource.designer.cs got modified

public static void UpdateIdValues()
{
...
lot of new rows
...
}

Solution 2

The errors in your console seem to relate to automatically added resources from the android SDK. Maybe try to get VS to regenerate the resources file by adding a new file (anything, you can remove it after) to the resources directory in the Android project. If that doesn't work try setting the compile and target versions to 8.0 explicitly and do the same thing.

Also, I think that ic_cast_grey is part of the Support v7 library so make sure you have that included in your list of Nuget packages.

Edit

You should also make sure your Android SDK stuff is up-to-date by running the SDK Manager as admin (assuming you're on Windows and installed it to default Program Files directory).

I've also read that sometimes it helps to remove and re-add the packages so that they refresh their local caches. Maybe you can try that, too.

Solution 3

I've had the same issue and fixed it by adding this entry to the csproj:

<AndroidUseManagedDesignTimeResourceGenerator>False</AndroidUseManagedDesignTimeResourceGenerator>

to disable the the managed tool and use again the old aapt tool.

Starting with Xamarin.Android 10.0.0.4, shipped with Visual Studio 2019 version 16.3 Preview 2 or Visual Studio 2019 for Mac version 8.3 Preview 2, Microsoft downgraded the warning to message/information.

So when 16.3 is final, the warnings will go away as they are no real issues.

Share:
11,733

Related videos on Youtube

SamyCode
Author by

SamyCode

Updated on June 04, 2022

Comments

  • SamyCode
    SamyCode about 2 years

    I am building an app, and I have hundred of warnings like this one: "Skipping TPProject.Resource.Drawable.ic_collapse_00000. Please check that your Nuget Package versions are compatible."

    My compile/target framework is Android 8.0, my target Android version is 6.0 and my minimum Android version is 5.1. I have updated all my Nuget packages to the latest versions.

    What's wrong??

    Warnings

  • Mark Clark
    Mark Clark about 5 years
    When you say 'update the Xamarin Extentions', are you referring to making sure the various Xamarin NuGet packages are up-to-date for the offending project?
  • Edward Koetsjarjan
    Edward Koetsjarjan over 4 years
    Yes, the update of Xamarin Extentions nuget package, this package will automatically update all essential packages (which probably causing an error)