How can I figure out what nuget package is throwing an error about Xamarin.Android.Support.v4 no longer supported?

Tony Pitman 41 Reputation points
2023-03-27T21:22:32.47+00:00

I have an old Xamarin.Forms app for iOS and Android that I am trying to upgrade to work on the latest Android OS.

When I build I get these errors:

    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(438,3): error XA0121: Assembly 'Xamarin.Android.Support.v4' is using '[assembly: Java.Interop.JavaLibraryReferenceAttribute]', which is no longer supported. Use a newer version of this NuGet package or notify the library author.
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(438,3): error XA0121: Assembly 'Xamarin.Android.Support.v4' is using '[assembly: Java.Interop.JavaLibraryReferenceAttribute]', which is no longer supported. Use a newer version of this NuGet package or notify the library author.
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(438,3): error XA0121: Assembly 'Xamarin.Android.Support.v4' is using '[assembly: Android.IncludeAndroidResourcesFromAttribute]', which is no longer supported. Use a newer version of this NuGet package or notify the library author.

The problem is I can't figure out which nuget package needs to be upgraded.

I read a MSDN article about how to turn on Verbose logging during build and have that turned on, so I see lots of details.

I can't seem to figure out which nuget or library is trying to bring that v4 library in.

Can someone point me to how to figure that out?

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,362 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.