I have this Xamarin.Android C# project in where I managed to retrieve my data from my Firestore DB to my app against all the odds from one of Firebase support guys who mentioned a few weeks ago because of Xamarin is not officially supported or something like that.
Anyway, all was working perfectly until I needed to use Google Auth which needs AndroidX Nuget Package in my project, and seems to exist a well known conflict between Guava and AndroidX packages.
So, now I'm having this error:
"Failed resolution of: Lcom/google/common/base/Preconditions;"
In my 'FirebaseFirestore GetDataBase()' function.
Code:
public FirebaseFirestore GetDataBase()
{
var app = FirebaseApp.InitializeApp(this);
FirebaseFirestore database;
if (app == null)
{
var options = new FirebaseOptions.Builder()
.SetProjectId("project-firebase")
.SetApplicationId("project-firebase")
.SetApiKey("ZIzaSyAq55czhZRo00c1JKHHtzdNiIX7vIXu5Iz")
.SetDatabaseUrl("https://project-firebase.firebaseio.com")
.SetStorageBucket("project-firebase.appspot.com")
.Build();
app = FirebaseApp.InitializeApp(Application.Context, options);
database = FirebaseFirestore.GetInstance(app);
}
else
{
database = FirebaseFirestore.GetInstance(app); //-- ERROR HERE!
}
return database;
}
I tried downgrading Guava to 27.1.0.0. but then another really bad, maybe the worst, error shows up:
"java.exe" exited with code 1.
So I went back to 28.2.0. Guava version, and long story short I'm stuck.
Could you guys please help me to find a workaround to this?