Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 831
Walid Moheyeldin Avatar asked Jul 18 '26 05:07

Walid Moheyeldin


2 Answers

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.

like image 139
Jessie Zhang -MSFT Avatar answered Jul 19 '26 20:07

Jessie Zhang -MSFT


Android project Properties > Android Options > Advanced button > HttpClient implementation dropdown - change to Default.

like image 28
Anton Chilikov Avatar answered Jul 19 '26 22:07

Anton Chilikov