"GenerateJavaStubs" task failed using ModernHttpClient

I'm using Modern Http Client in my xamarin forms project to get access on my rest api which is secured with azure active directory. In iOS i have no problems and i get my json data. But in android i get the following error:

Error The "GenerateJavaStubs" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load assembly 'System.Net.Requests, Version=3.9.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Perhaps it doesn't exist in the Mono for Android profile?
File name: 'System.Net.Requests.dll'
at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference)
at Mono.Cecil.MetadataResolver.Resolve(TypeReference type)
at Mono.Cecil.ModuleDefinition.Resolve(TypeReference type)
at Mono.Cecil.TypeReference.Resolve()
at Java.Interop.Tools.Cecil.TypeDefinitionRocks.GetBaseType(TypeDefinition type)
at Java.Interop.Tools.Cecil.TypeDefinitionRocks.c__Iterator0.MoveNext()
at System.Linq.Enumerable.Any[TSource](IEnumerable1 source, Func2 predicate)
at Java.Interop.Tools.Cecil.TypeDefinitionRocks.IsSubclassOf(TypeDefinition type, String typeName)
at Java.Interop.Tools.JavaCallableWrappers.JavaTypeScanner.AddJavaTypes(List1 javaTypes, TypeDefinition type, Action2 log)
at Java.Interop.Tools.JavaCallableWrappers.JavaTypeScanner.GetJavaTypes(IEnumerable1 assemblies, IAssemblyResolver resolver, Action2 log)
at Xamarin.Android.Tasks.GenerateJavaStubs.Run()
at Xamarin.Android.Tasks.GenerateJavaStubs.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() HavanaTimeRecording.Droid

Can anybody help me to solve this problem?

Sign In or Register to comment.