Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Objective: Getting exception 'System.ArgumentException' after clicking Graphics->Alpha Bitmap.
Steps to reproduce:
1. Open Application.
2. Go to Graphics->Alpha Bitmap.
Application throwing exception after clicking 'Graphics->Alpha Bitmap'.
Application should work properly.
Unhandled Exception: System.ArgumentException: Couldn't bind to method 'GetReadHandler'.
E/mono ( 8723): at System.Delegate.GetCandidateMethod (System.Type type, System.Type target, System.String method, BindingFlags bflags, Boolean ignoreCase, Boolean throwOnBindFailure) [0x00000] in <filename unknown>:0
E/mono ( 8723): at System.Delegate.CreateDelegate (System.Type type, System.Type target, System.String method, Boolean ignoreCase, Boolean throwOnBindFailure) [0x00000] in <filename unknown>:0
E/mono ( 8723): at System.Delegate.CreateDelegate (System.Type type, System.Type target, System.String method) [0x00000] in <filename unknown>:0
E/mono ( 8723): at Android.Runtime.JNIEnv.RegisterJniNatives (IntPtr typeName_ptr, Int32 typeName_len, IntPtr jniClass, IntPtr methods_ptr, Int32 methods_len) [0x00000] in <filename unknown>:0
E/mono ( 8723): at (wrapper delegate-invoke) <Module>:invoke_intptr__this___intptr_intptr_string_string (intptr,intptr,string,string)
E/mono ( 8723): at Android.Runtime.JNIEnv.GetMethodID (IntPtr kls, System.String name, System.String signature) [0x00000] in <file
Device (LG P500)
Target Framework: 2.2 Froyo
System.MissingMethodException: Method not found: 'Android.Graphics.Canvas.DrawColor'.
at Android.Views.View.n_OnDraw_Landroid_graphics_Canvas_ (intptr,intptr,intptr) [0x00010] in /Users/builder/data/lanes/monodroid-mac-master/41c055cd/source/monodroid/src/Mono.Android/platforms/android-8/src/generated/Android.Views.View.cs:6891
at (wrapper dynamic-method) object.1c758bd1-3a71-4ea9-963a-d34932371000 (intptr,intptr,intptr) <IL 0x00012, 0x00033>
Are you sure that the on-device Mono.Android.Platform package is correct. For intermediate versions, the version numer is unchanged (e.g. 4.1.1) even when they've had ABI changes. You need to ensure that you remove all Mono packages from the device when you install a new Mono for Android install, so that the device has the matching packages.
To confirm, remove the Mono packages from the device and re-install the app on the device.
Verified the fix personally as per 4592.
Nischal says that he can repo the issue even after fully cleaning the device, so I will check on more than one device and report back.
Ok - so after a bit of testing myself I found that the issue manifests only on Release configuration, and the device doesn't seem to matter. (Repro'd on the device I originally saw the correct behavior on in comment 3)
The Release issue is fixed in 6755388de0f4b6b0d88fca157c4633e1b1a4f3cc.