SFChart [object reference is not set to an instance of an object (crash on android but not on iOS)]

Hi, 

I'm having problems with this control on android, every time I start the application, I get the message of null reference, exactly: "object reference not set to an instance of an object" but only in android, in iOS works perfectly. By the way, I can not even run your example because I get the same error

https://help.syncfusion.com/xamarin/sfchart/getting-started

3 Replies

DV Divya Venkatesan Syncfusion Team April 24, 2018 08:52 AM UTC

Hi Recaditossa, 
 
We have tested the sample in the given link. The sample works fine, and we have attached for your reference. Could you please check with the sample in the following location? If you still face the problem, please revert us by modifying the sample based on your application along with replication procedure. This would be helpful for us to serve you. 
 
 
Regards, 
Divya Venkatesan 
 



LB Lóan Burger July 6, 2018 09:33 AM UTC

I have the exact same problem in Android.  I am using Xamarin Forms with latest SyncFusion Library and when the View loads my data is retrieved and set to the binding Data property then the chart crashed - Reference not set to an instance of an object.  This seems to have been introduced with the latest version.


MP Michael Prabhu M Syncfusion Team July 9, 2018 05:54 AM UTC

Hi Loan, 
We have analyzed your query. We suspect that you have added the native android NuGet package along with the forms android NuGet package in android project. Please remove the native android NuGet package if you have added in the android project mistakenly. 
 
Also, please make sure that you have the same version of Xamarin.Forms NuGet in all your Xamarin.Forms projects and follow the below steps to resolve this issue. 
  
1.      Close the Visual Studio. 
2.      Delete bin and obj folder. 
3.      Open the Visual Studio again and rebuild the solution. 
4.      Now deploy the app in emulator or device. 
  
Please let us know if you are still facing any issue in this. 
Thanks, 
Michael 


Loader.
Up arrow icon