f-miyu / Plugin.CloudFirestore

MIT License
121 stars 44 forks source link

Android Release FirestoreSettings AreTimestampsInSnapshotsEnabled() Error #109

Closed albertroucka closed 1 year ago

albertroucka commented 1 year ago

Hello, I have a problem with exporting Android app with this plugin. On debug, everything works fine, but when I want to build a release, it throws me the error below. Thanks for your help.

"Errr Mono.Linker.MarkException: Error processing method: 'System.Void Plugin.CloudFirestore.FirestoreSettings::.cctor()' in assembly: 'Plugin.CloudFirestore.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Boolean Firebase.Firestore.FirebaseFirestoreSettings::AreTimestampsInSnapshotsEnabled() v Mono.Linker.Steps.MarkStep.HandleUnresolvedMethod(MethodReference reference) v Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference) v Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction) v Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body) v Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method) v Mono.Linker.Steps.MarkStep.ProcessQueue() --- End of stack trace for inner exception --- v Mono.Linker.Steps.MarkStep.ProcessQueue() v Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue() v Mono.Linker.Steps.MarkStep.Process() v Mono.Linker.Steps.MarkStep.Process(LinkContext context) v MonoDroid.Tuner.MonoDroidMarkStep.Process(LinkContext context) v Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step) v Mono.Linker.Pipeline.Process(LinkContext context) v MonoDroid.Tuner.Linker.Process(LinkerOptions options, ILogger logger, LinkContext& context) v Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res) v Xamarin.Android.Tasks.LinkAssemblies.RunTask() v Microsoft.Android.Build.Tasks.AndroidTask.Execute() v /Users/runner/work/1/s/xamarin-android/external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/AndroidTask.cs:line 17"

albertroucka commented 1 year ago

NuGet package Plugin.CloudFirestore.Fix fixed this problem

Yuvix25 commented 3 weeks ago

Same here, Plugin.CloudFirestore.Fix fixed it (instead of Plugin.CloudFirestore). I did however also need to install the latest (monoandroid supporting) version of Xamarin.Io.OpenCensus.OpenCensusApi (which was 0.31.1.5). Not sure if it's related or if it's a different issue, but might as well write it just in case it is related.