ZKWeb.System.Drawing icon indicating copy to clipboard operation
ZKWeb.System.Drawing copied to clipboard

libgdiplus DllNotFoundException on Xamarin Android project

Open yk-e opened this issue 8 years ago • 1 comments

I am using Windows 10 and installed ZKWeb.System Drawing 4.0.1. I added a simple Bitmap initialization line to the code. While debugging the my sample application on Android emulator, libgdiplus.dll not found exception is thrown. How can I fix it, could you help on this?

{System.TypeInitializationException: The type initializer for 'System.DrawingCore.GDIPlus' threw an exception. ---> System.DllNotFoundException: gdiplus at (wrapper managed-to-native) System.DrawingCore.GDIPlus:GdiplusStartup (ulong&,System.DrawingCore.GdiplusStartupInput&,System.DrawingCore.GdiplusStartupOutput&)

at System.DrawingCore.GDIPlus..cctor () [0x000ab] in :0

--- End of inner exception stack trace ---

at System.DrawingCore.Bitmap..ctor (System.Int32 width, System.Int32 height, System.DrawingCore.Imaging.PixelFormat format) [0x00006] in :0

at System.DrawingCore.Bitmap..ctor (System.Int32 width, System.Int32 height) [0x00000] in :0 at (wrapper remoting-invoke-with-check) System.DrawingCore.Bitmap:.ctor (int,int)

at XamarinWebSample.SampleService+<Print>d__7.MoveNext () [0x00008] in C:\VS_TFS\DivaPos\Mobile\XamarinWebSample\XamarinWebSample\SampleService.cs:72 --- End of stack trace from previous location where exception was thrown ---

at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <657aa8fea4454dc898a9e5f379c58734>:0

at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <657aa8fea4454dc898a9e5f379c58734>:0

at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <657aa8fea4454dc898a9e5f379c58734>:0

at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <657aa8fea4454dc898a9e5f379c58734>:0 at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <657aa8fea4454dc898a9e5f379c58734>:0 at (wrapper dynamic-method) System.Object:CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,object) at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet] (System.Runtime.CompilerServices.CallSite site, T0 arg0) [0x00104] in <65f4a23934a3468fae9abe3139b55169>:0 at XamarinWebSample.WebCallbackRepository+<>c__DisplayClass13_1+<<RegisterCallbackInfo>b__1>d.MoveNext () [0x00148] in ..\XamarinWebSample\WebCallbackRepository.cs:125 }

yk-e avatar Jan 24 '18 08:01 yk-e

This library is for .Net Core and untested on xamarin, becasue xamarin is based on mono, you should able to use the official System.Drawing from mono poroject.

303248153 avatar Jan 24 '18 09:01 303248153