Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Could not find 1 Android X assemblies, make sure to install the following NuGet packages: - Xamarin.AndroidX.AppCompat.Resources

I am getting the following error in a Xamarin Forms application. I have migrated my application to AndroidX.

Xamarin.AndroidX.Migration.1.0.0/build/monoandroid90/Xamarin.AndroidX.Migration.targets(9,9): Error: Could not find 1 Android X assemblies, make sure to install the following NuGet packages: - Xamarin.AndroidX.AppCompat.Resources You can also copy-and-paste the following snippet into your .csproj file:

I have deleted my bin and obj folders and tried to rebuild to no avail.

I have gone back and done a clean/rebuild to no avail.

I have made sure that all my Xamarin.AndroidX nugets to make sure that they are up to date, and am using the nugets from February 14, 2020.

I am using the Xamarin.Forms 4.5.0.282-pre4. I need this because of some updates to use WkWebView in some web content that I display in the iOS side. the iOS side compiles just fine.

I'm using the most upto date VSMac in the stable channel.

Any idea how to resolve this issue? I'm up for any ideas. TIA.

like image 892
Wallace B. McClure Avatar asked Feb 20 '20 15:02

Wallace B. McClure


2 Answers

I was busting my head over the same issue. Migrating "packages.config" to "PackageReferences" worked for me!

You can find more details here in docs

like image 199
Pratik Avatar answered Sep 18 '22 10:09

Pratik


I faced the same problem. I solved it installing the following Nuget packages

Xamarin.AndroidX.Legacy.Support.V4
Xamarin.AndroidX.Lifecycle.LiveData
Xamarin.AndroidX.Migration

In general take a look at the tool output who is much detailed about what packages are missing

like image 25
backspace83 Avatar answered Sep 20 '22 10:09

backspace83