XF-Material-Library: System.TypeLoadException: VTable setup of type XF.Material.Forms.UI.MaterialButton failed

Describe the bug I honestly dont know where this error came from but it all happened when i was preparing an app for production. Doing the steps: Setting the build option to release mode etc. It throws this error System.TypeLoadException: VTable setup of type XF.Material.Forms.UI.MaterialButton failed I have AppCenter logging my crashes and the error it reports is: xxxx.Views.Audio.xxxxx.DetailsPage..ctor (Testing.Models.Audio audio) [0x00008] in <dd419e9e473f46438506fd55f81978c1>:0 AudioPage+<AudioListView_OnItemTapped>d__5.MoveNext () AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) SyncContext+<>c__DisplayClass2_0.<Post>b__0 () Thread+RunnableImplementor.Run () IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) (wrapper dynamic-method) System.Object.51(intptr,intptr)

To Reproduce Steps to reproduce the behavior:

  1. Download latest plugin version
  2. Set build action to release mode

Expected behavior App will crash and display System.TypeLoadException: VTable setup of type XF.Material.Forms.UI.MaterialButton failed

Desktop (please complete the following information):

  • OS: Mac OS Mojave
  • Browser Firefox

Smartphone (please complete the following information):

  • Device: Honor 6x
  • OS: Android Pie 9.0
  • Browser stock browser
  • Version 9.0

Additional context To by pass this bug, i downgrade the version of this plugin to v1.3.0.5. This version was the last stable version for me hence thats why i downgraded to it.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15

Most upvoted comments

You can track the issue here.

When i am updating the application again i will test the new version of this plugin, as i stated i downgraded the version of the plugin. I cant give a valid response if its working or not until i do a next update in the future.

Hi, for now the target Android version of the library is still 8.1. But I will still check if this issue still occur when I update the version.

Xamarin.Forms latest version 3.4.0.1029999 only supports Android version 8.1, the pre-release 3.5.* support 9.0. I will be waiting the latest stable release of Xamarin.Forms before I update the library’s target Android version.