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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Crash with Unhandled Exception : LoadApplication

Thread ID:

Created:

Updated:

Platform:

Replies:

145449 Jun 22,2019 10:21 AM UTC Jun 25,2019 06:57 AM UTC Xamarin.Forms 1
loading
Tags: SfChart
Christian HABIB JIWAN
Asked On June 22, 2019 10:21 AM UTC

Hello,

  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 :-)

            base.OnCreate(savedInstanceState);

            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"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:d="http://xamarin.com/schemas/2014/forms/design"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:chart="clr-namespace:Syncfusion.SfChart.XForms;assembly=Syncfusion.SfChart.XForms"
             mc:Ignorable="d"
             x:Class="App1.MainPage">


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


</ContentPage>

Thanks for your help.
Christian

Bharathiraja K [Syncfusion]
Replied On 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.  
 
Regards, 
Bharathi. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon