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

Problem with ImageEditor

I'm trying to use the ImageEditor but getting an exception when opening an image on android using Xamarin.forms.
Do you have any sample on available on how to useImageEditoron Xamarin.forms?
[MonoDroid] System.InvalidCastException: Unable to convert instance of type 'Syncfusion.SfImageEditor.Android.ImageContainer' to type 'Syncfusion.SfImageEditor.Android.ImageContainer'.
[MonoDroid] at Java.Interop.JavaObjectExtensions.CastClass (Android.Runtime.IJavaObject instance, System.Type resultType) [0x0005d] in :0
[MonoDroid] at Java.Interop.JavaObjectExtensions._JavaCast[TResult] (Android.Runtime.IJavaObject instance) [0x0002f] in :0
[MonoDroid] at Java.Interop.JavaObjectExtensions.JavaCast[TResult] (Android.Runtime.IJavaObject instance) [0x00000] in :0
[MonoDroid] at Android.Runtime.Extensions.JavaCast[TResult] (Android.Runtime.IJavaObject instance) [0x00000] in :0
[MonoDroid] at Android.Views.View.FindViewById[T] (System.Int32 id) [0x00007] in :0
[MonoDroid] at Syncfusion.SfImageEditor.Android.SfImageEditor.SetImageView (Android.Graphics.Bitmap bitmap) [0x0003d] in :0
[MonoDroid] at Syncfusion.SfImageEditor.Android.SfImageEditor.Initialize (Android.Content.Context context) [0x000ec] in :0
[MonoDroid] at Syncfusion.SfImageEditor.Android.SfImageEditor..ctor (Android.Content.Context context) [0x0001e] in :0
[MonoDroid] at Syncfusion.SfImageEditor.XForms.Droid.SfImageEditorRenderer+d__4.MoveNext () [0x0004f] in :0
[MonoDroid] --- End of stack trace from previous location where exception was thrown ---
[MonoDroid] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <3fd174ff54b146228c505f23cf75ce71>:0
[MonoDroid] at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__6_0 (System.Object state) [0x00000] in <3fd174ff54b146228c505f23cf75ce71>:0
[MonoDroid] at Android.App.SyncContext+<>c__DisplayClass2_0.b__0 () [0x00000] in :0
[MonoDroid] at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in :0
[MonoDroid] at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] in :0
[MonoDroid] at (wrapper dynamic-method) System.Object:e6a047b0-76c9-4671-85fa-b313032038f9 (intptr,intptr)

3 Replies

AK Ashwin Kumaravel Syncfusion Team August 10, 2017 05:16 AM UTC

Hi Andreas,

Thanks for the update,

Could you please ensure from your side that whether you have referred Syncfusion.SfImageEditor.Android along with Xforms and Xforms.Android aseemblies.If you have referred Syncfusion.SfImageEditor.Android assembly then please remove this from your assembly reference.

For better understanding please refer ImageEditor control dependencies from the below link,

Link- https://help.syncfusion.com/xamarin/introduction/control-dependencies#sfimageeditor  


AN Andreas August 10, 2017 11:11 AM UTC


Thanks, this seems to fix the problem.

However, now I have another issue. Whenever I save an image it seems to be resized down to half size. Is there a way to fix this?

Kind regards,


AK Ashwin Kumaravel Syncfusion Team August 11, 2017 12:42 PM UTC

Hi Andreas,

Sorry for the inconvenience caused.

We could reproduce the reported issue “Image is resized down to half size” at our end. And we have logged a defect report regarding the same. A support incident to track the status of this defect has been created under your account.

Please log on to our support website to check for further updates.


Ashwin K

Live Chat Icon For mobile
Up arrow icon