uzzum07
uzzum07

Reputation: 101

Could not find 19 Android X assemblies, make sure to install nugget packages Xamarin

I am trying to integrate Firebase Analytics into my app and I am following this really helpful article https://www.thewissen.io/using-firebase-analytics-in-your-xamarin-forms-app/ but when I download any of the nugget packages mentioned in the article my app gives me this error "Could not find 19 Android X assemblies, make sure to install nugget packages Xamarin".The Nugets I install are

Xamarin.FireBase.Analytics
Xamarin.FireBase.Analytics.Impl
Plugin.CurrentActivity

I follow the prompt exactly and it is asking me to install the following NUGETS:

Xamarin.androisX.Lifecycle.LiveData, 
Xamarin.AndroidX.Browser,
Xamarin.Google.Android.Material, 
Xamarin.AndroidX.Legacy.Support.V4

I have done that and when I clean my project and rebuild I get

java.exe exited with code 1 msb6006

I have tried removing other nugets that might be causing issues but my code only works after I remove all three of the Nugets mentioned in the article. I have read other articles and they all say to use those. Other nuggets I have include:

Microsoft.AppCenter,
Microsoft.AppCenter.Analytics
Microsoft.AppCenter.Crashes

I don't really know how to fix this issue, I have tried reading about these packages and they all seem to be continuously worked on so they don't seem to be outdated or anything like that. Also I followed the articles iOS implementation and it worked fine.

Upvotes: 1

Views: 676

Answers (1)

Stephen Duffy
Stephen Duffy

Reputation: 71

I had the same problem with adding Firebase to a new Xamarin Forms (4.8.0) app. When I updated my Android csproj file directly with the packages listed in the error message and rebuilt it worked though.

Upvotes: 2

Related Questions