System.InvalidCastException: Specified cast is not valid.
at Naxam.Controls.Mapbox.Platform.Droid.MapViewRenderer.OnElementChanged (Xamarin.Forms.Platform.Android.ElementChangedEventArgs`1[TElement] e) [0x00076] in D:\Github\Xamarin\mapbox-xamarin-forms\Naxam.Mapbox.Platform.Droid\MapViewRenderer.cs:45
Sometimes i got error
System.InvalidCastException: Specified cast is not valid. at Naxam.Controls.Mapbox.Platform.Droid.MapViewRenderer.OnElementChanged (Xamarin.Forms.Platform.Android.ElementChangedEventArgs`1[TElement] e) [0x00076] in D:\Github\Xamarin\mapbox-xamarin-forms\Naxam.Mapbox.Platform.Droid\MapViewRenderer.cs:45
This can be fixed by changing
var activity = (AppCompatActivity) Context;
tovar activity = (AppCompatActivity) Context.GetActivity();
https://github.com/NAXAM/mapbox-xamarin-forms/blob/3f9fed5dea3c2e70a6f220f34ce1fba12d7909fc/Naxam.Mapbox.Platform.Droid/MapViewRenderer.cs#L45