We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Crash with Unhandled Exception : LoadApplication


  I try to develop an application for Android and Windows (UWP) with Xamarin and Syncfusion.

  Today I have just write a test application with SfChart.  In the XAML file I have add an empty chart.
  On Windows the application start without any problem.

  On my Mobile Android phone (Android 9.0) the Application Crach with :
          Unhandled Exception:
          System.InvalidCastException: <Timeout exceeded getting exception details>

  This exception is created on LoadApplication(new App()); without any extra detail to helpme.

Below see the MainActivity.cs Code :
namespace App1.Droid
    [Activity(Label = "App1", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
    public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
        protected override void OnCreate(Bundle savedInstanceState)
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource = Resource.Layout.Toolbar;

            Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("..................");  //(Off course I have add my key :-)


            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);

            new SfChartRenderer();

            LoadApplication(new App());
        public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults)
            Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);

            base.OnRequestPermissionsResult(requestCode, permissions, grantResults);

And the XAML code :
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"

        <chart:SfChart Margin="0,200,0,200">
                <chart:ChartTitle Text="Votre Jounrée"/>
                <chart:NumericalAxis Minimum="0" Maximum="24" Interval="2">
                <chart:NumericalAxis Minimum="0" Maximum="250" Interval="10">
                        <chart:NumericalStripLine Start="80" Width="50" FillColor="#7FD3D3D3"/>


Thanks for your help.

1 Reply

BK Bharathiraja K Syncfusion Team June 25, 2019 06:57 AM UTC

Hi Christian,  
Greetings. We have provided response for the same query under your Direct Track incident id which is created by you. Please refer the Direct Track incident for further follow-up.  

Live Chat Icon For mobile
Up arrow icon