Unable to convert instance of type 'Syncfusion.SfImageEditor.Android.ImageContainer' to type 'Syncfusion.SfImageEditor.Android.ImageContainer'.

Hello,
When deploying app in Android, I am getting below mentioned error

10-13 14:32:16.841 E/mono    ( 5012): Unhandled Exception:
10-13 14:32:16.841 E/mono    ( 5012): System.InvalidCastException: Unable to convert instance of type 'Syncfusion.SfImageEditor.Android.ImageContainer' to type 'Syncfusion.SfImageEditor.Android.ImageContainer'.
10-13 14:32:16.841 E/mono-rt ( 5012): [ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidCastException: Unable to convert instance of type 'Syncfusion.SfImageEditor.Android.ImageContainer' to type 'Syncfusion.SfImageEditor.Android.ImageContainer'.

I am able to build the app successfully. But I am facing error when clicking image or uploading existing image in Android simulator.
Currently I am only using ImageEditor plugin of syncfusion.
Any help will be appreciated. 

Please  check the output window error: https://www.screencast.com/t/IPRlxG1PX

5 Replies

SG Sri Gayathri Gopalakrishnan Syncfusion Team October 13, 2017 10:57 AM UTC

Hi Maulik ,

Thanks for using Syncfusion Products,

If you are referring Nuget packages, please refer the below screenshot and ensure only those assemblies are added in the references, if it contains Syncfusion.SfImageEditor.Android and Syncfusion.SfImageEditor.iOS assemblies then please remove those assemblies.
  
Screenshot:

Android  

iOS  


Please get back to us if you have any concerns.

Regards,
Sri Gayathri.G 



MS Maulik Sakhare October 13, 2017 01:40 PM UTC

Its working perfectly fine in IOS. I am only getting error in Android. Please find the reference assemblies as in screenshot.




AK Ashwin Kumaravel Syncfusion Team October 16, 2017 04:32 AM UTC

Hi Maulik ,

Thanks for the update,

As we mentioned in previous update, can you please remove Syncfusion.SfImageEditor.Android assembly from your reference list to overcome this issue?

Please get back to us if you have any concern,

Regards,
Ashwin



MS Maulik Sakhare October 16, 2017 07:47 AM UTC

After removing xxxxx I am getting error as follows : 

System.TypeLoadException: Could not load type 'Syncfusion.SfImageEditor.Android.ImageContainer' from assembly 'Syncfusion.SfImageEditor.Android, Version=15.3451.0.26, Culture=neutral, PublicKeyToken=null'.

It shows version as 15.3451.0.26 but I am using 15.3451.0.33 in portable and Android project.




AK Ashwin Kumaravel Syncfusion Team October 17, 2017 06:26 AM UTC

Hi Maulik ,

Thanks for the update,

We have validated your query and can you please ensure from your side whether all the referred assemblies are in same version. If there is any mismatch in the product version of the assemblies will lead to the reported errors. And please clear the nuget cache before you build the solution.

For Mac

Can you please check and remove if there is any package in the following location?

• ~/.local/share/NuGet/Cache
• ~/.nuget/package

For Windows,

Follow the below link to clear cache,

https://www.syncfusion.com/kb/6987/how-to-clear-nuget-cache

Try the above mention steps and please get back us if you have any concern.

Regards,
Ashwin

Loader.
Up arrow icon