Search code examples
xamarinxamarin.formsbuild-error

Xamarin.Forms Failed to resolve 'System.Net.Http.HttpClientHandler'


The project was working fine before just I reinstalled the OS and Visual Studio, when I build the project this error is showing.

"Failed to resolve 'System.Net.Http.HttpClientHandler' from 'Mono.Android'. Please check your AndroidHttpClientHandlerType setting. TakolA.Mobile.Android"

enter image description here


Solution

  • You can try the following steps:

    1.delete the obj folders and bin folders of every platform, then rebuild it.

    2.if the problem persists, try to update your Xamarin projects with the Android HttpClient and Native TLS 1.2 settings, then re-build your apps and try again.

    The Xamarin.Android HttpClient configuration is in Project Options > Android Options, then click the Advanced Options button.

    For more information,check: HttpClient Stack and SSL/TLS Implementation Selector for Android.