MvvmCross: Android: "Method 'Array.Empty' not found" after upgrading to MvvmCross 4.1.5

Debug build. Regression from previous MvvmCross version. I get this from OnCreate in the splash screen (or any activity):

05-19 11:09:32.301 I/MonoDroid( 4626): UNHANDLED EXCEPTION:
05-19 11:09:32.302 I/MonoDroid( 4626): System.MissingMethodException: Method 'Array.Empty' not found.
05-19 11:09:32.302 I/MonoDroid( 4626):   at MvvmCross.Droid.Views.MvxActivityViewExtensions.OnViewCreate (IMvxAndroidView androidView, Android.OS.Bundle bundle) [0x00055] in <filename unknown>:0 
05-19 11:09:32.302 I/MonoDroid( 4626):   at MvvmCross.Droid.Views.MvxActivityAdapter.EventSourceOnCreateCalled (System.Object sender, MvvmCross.Platform.Core.MvxValueEventArgs`1 eventArgs) [0x0000c] in <filename unknown>:0 
05-19 11:09:32.302 I/MonoDroid( 4626):   at (wrapper delegate-invoke) System.EventHandler`1[MvvmCross.Platform.Core.MvxValueEventArgs`1[Android.OS.Bundle]]:invoke_void_object_TEventArgs (object,MvvmCross.Platform.Core.MvxValueEventArgs`1<Android.OS.Bundle>)
05-19 11:09:32.302 I/MonoDroid( 4626):   at MvvmCross.Platform.Core.MvxDelegateExtensionMethods.Raise[T] (System.EventHandler`1 eventHandler, System.Object sender, MvvmCross.Platform.Core.T value) [0x00000] in C:\vcs\git\MvvmCross\MvvmCross\Platform\Platform\Core\MvxDelegateExtensionMethods.cs:21 
05-19 11:09:32.302 I/MonoDroid( 4626):   at MvvmCross.Platform.Droid.Views.MvxEventSourceActivity.OnCreate (Android.OS.Bundle bundle) [0x00014] in <filename unknown>:0 
05-19 11:09:32.302 I/MonoDroid( 4626):   at MvvmCross.Droid.Views.MvxSplashScreenActivity.OnCreate (Android.OS.Bundle bundle) [0x00017] in <filename unknown>:0 
05-19 11:09:32.302 I/MonoDroid( 4626):   at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (IntPtr jnienv, IntPtr native__this, IntPtr native_savedInstanceState) [0x00011] in /Users/builder/data/lanes/3236/ee215fc9/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.App.Activity.cs:2857 
05-19 11:09:32.302 I/MonoDroid( 4626):   at (wrapper dynamic-method) System.Object:9d1dec28-a475-47d8-bf75-9f8825205101 (intptr,intptr,intptr)
05-19 11:09:32.309 W/art     ( 4626): JNI RegisterNativeMethods: attempt to register 0 native methods for md52ce486a14f4bcd95899665e9d932190b.JavaProxyThrowable

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 6
  • Comments: 25 (11 by maintainers)

Most upvoted comments

I agree. Although I’m ok with running beta Xamarin on my box, I think the stable NuGet packages should only be released when built on Xamarin stable. Otherwise, I think we’re just asking for confusion.

Pushing new packages built against latest stable.

Well the problem is that MvvmCross does not have its own CI so I build this on my own machine every time. And to be honest, I don’t want to downgrade each and every time I wan’t to make a release.

Bitrise which we use right now, does not build for the Windows platforms, I don’t think it builds Xamarin.Mac projects either.

We need something else that fits our needs such as VSTS or TeamCity or whatever else that can build for all the platforms we target.

I’m seeing this as well in Debug and Release modes when deploying Xamarin.Android projects. Reverting to version 4.1.4 causes the problem to disappear. Perhaps the changes to binding reflections in 4.1.5 brought about this change? Also, since it sounds similar to an old Mono vs .NET 4.6 bug…I should not that I am currently running Windows 10 with .NET 4.6