Hello,
I've got a problem with building a release version of my app.
When built as Debug (with 'Use shared Mono runtime' checked and Linker behavior: Don't link) it's working on my android device.
But when building a release version. And starting it via "Start without debugging" it's built, deployed but crashes just after it starts.
In App output I've got:
[monodroid-gc] GREF GC Threshold: 46800
[] cant resolve internal call to "System.Runtime.InteropServices.Marshal::ReadIntPtr(intptr,int)" (tested without signature also)
[mono]
[mono] Your mono runtime and class libraries are out of sync.
[mono] The out of sync library is: mscorlib.dll
[mono]
[mono] When you update one from svn you need to update, compile and install
[mono] the other too.
[mono] Do not report this as a bug unless you're sure you have updated correctly:
[mono] you probably have a broken mono install.
[mono] If you see other errors or faults after this message they are probably related
[mono] and you need to fix your mono install first.
[] cant resolve internal call to "System.Runtime.InteropServices.Marshal::ReadIntPtr(intptr,int)" (tested without signature also)
[mono]
[mono] Your mono runtime and class libraries are out of sync.
[mono] The out of sync library is: mscorlib.dll
[mono]
[mono] When you update one from svn you need to update, compile and install
[mono] the other too.
[mono] Do not report this as a bug unless you're sure you have updated correctly:
[mono] you probably have a broken mono install.
[mono] If you see other errors or faults after this message they are probably related
[mono] and you need to fix your mono install first.
[mono]
[mono] Unhandled Exception:
[mono] System.MissingMethodException: Cannot find the requested method.
[mono] at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal:ReadIntPtr (intptr,int)
[mono] at System.Runtime.InteropServices.Marshal.ReadIntPtr (IntPtr ptr) [0x00000] in <filename unknown>:0
[mono] at Android.Runtime.JNIEnv.CreateNativeInterface () [0x00000] in <filename unknown>:0
[mono] at Android.Runtime.JNIEnv.Initialize (IntPtr envptr, IntPtr grefLoader, IntPtr Loader_loadClass, UInt32 logCategories, IntPtr Class_getName, IntPtr javaVm, Int32 ver, Int32 localRefsAreIndirect, Int32 grefGcThreshold) [0x00000] in <filename unknown>:0
[mono] [ERROR] FATAL UNHANDLED EXCEPTION: System.MissingMethodException: Cannot find the requested method.
[mono] at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal:ReadIntPtr (intptr,int)
[mono] at System.Runtime.InteropServices.Marshal.ReadIntPtr (IntPtr ptr) [0x00000] in <filename unknown>:0
[mono] at Android.Runtime.JNIEnv.CreateNativeInterface () [0x00000] in <filename unknown>:0
[mono] at Android.Runtime.JNIEnv.Initialize (IntPtr envptr, IntPtr grefLoader, IntPtr Loader_loadClass, UInt32 logCategories, IntPtr Class_getName, IntPtr javaVm, Int32 ver, Int32 localRefsAreIndirect, Int32 grefGcThreshold) [0x00000] in <filename unknown>:0
I've cleaned all "Mono*" apps from device. Reinstalled Xamarin Studio. But this error is persistent.
Xamarin Studio
Version 4.0.8 (build 2)
Xamarin.Android
Version: 4.6.7 (Business Edition)