Next, I'm finishing my project and as last step I'm trying to "archive" my android project, but when trying to file it it generates the following error:
Erro Falha inesperada da tarefa "LinkAssemblies".
Mono.Linker.MarkException: Error processing method: 'System.Void Xamarin.Forms.Pages.BaseDataSource/<Initialize>d__22::MoveNext()' in assembly: 'Xamarin.Forms.Pages.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Void Xamarin.Forms.Log::Warning(System.String,System.String)
em Mono.Linker.Steps.MarkStep.HandleUnresolvedMethod(MethodReference reference)
em Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference)
em Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction)
em Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
em Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
em Mono.Linker.Steps.MarkStep.ProcessQueue()
--- Fim do rastreamento de pilha de exceções internas ---
em Mono.Linker.Steps.MarkStep.ProcessQueue()
em Mono.Linker.Steps.MarkStep.ProcessEntireQueue()
em Mono.Linker.Steps.MarkStep.Process()
em Mono.Linker.Steps.MarkStep.Process(LinkContext context)
em Mono.Linker.Pipeline.Process(LinkContext context)
em MonoDroid.Tuner.Linker.Process(LinkerOptions options, ILogger logger, LinkContext& context)
em Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
em Xamarin.Android.Tasks.LinkAssemblies.Execute()
em Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
em Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() AppRDVAUX.Android C:\Program Files (x86)\Microsoft Visual Studio17\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets 1748
After much searching I noticed that this error is related to an option marked in Android.Manifest called Linker, in it you have the option to "compact" your application in a way that does not get too big. Without this option marked my project generates the apk, but it gets very big (70mb). So in short, does anyone know how to make this linking option work or do you have some other way to make the generated apk get smaller? Thanks in advance to anyone who can respond.