I cannot use HybridWebView in Xamarin.Forms

I am trying to use the HybridWebView control inside a Xamarin.Forms page but I get the following exception when the related page is called:
System.TypeInitializationException: An exception was thrown by the type initializer for Xamarin.Forms.Labs.Controls.HybridWebView

I have created the following page in the PCL project:

public class WebsiteView : ContentPage
public WebsiteView()

        var webView = new HybridWebView();

        //Some other functionality....

       Content = webView;



Am I missing something regarding the usage of this control?



  • SKallSKall USMember ✭✭✭✭

    Probably an old issue with the JSON serializer which defaults to System.Runtime serializer unless specifically set in Ioc Resolver. The bug has been fixed and if you replace Xamarin.Forms.Labs with XLabs.Forms package (our new project structure) you should get a version that works.

  • Thank you very much for your help. I just replaced the Xamarin.Forms.Labs package with the new one and now it works properly.

Sign In or Register to comment.