[英]Xamarin Forms NoSuchMethodError: no static method FormsViewGroup.sendViewBatchUpdate
Updated Visual Studio Community and several NuGet packages in a working solution.在工作解决方案中更新了 Visual Studio 社区和几个 NuGet 包。 Now when trying to run on an Android device or simulator getting the following error:
现在尝试在 Android 设备或模拟器上运行时出现以下错误:
Java.Lang.NoSuchMethodError: no static method "Lcom/xamarin/forms/platform/android/FormsViewGroup;.sendViewBatchUpdate(Landroid/view/View;FFIZFFFFFFFF)V"
Java.Lang.NoSuchMethodError:没有静态方法“Lcom/xamarin/forms/platform/android/FormsViewGroup;.sendViewBatchUpdate(Landroid/view/View;FFIZFFFFFFFF)V”
Downgrading is not an option.降级不是一种选择。
Tried Clean All
and delete bin
and obj
as suggested here but it didn't help.试过
Clean All
并按照此处的建议删除bin
和obj
,但没有帮助。 Tried different versions of Xamarin.Forms
, also didn't help.尝试了不同版本的
Xamarin.Forms
,也没有帮助。
System:系统:
macOS 10.15.3
macOS 10.15.3
Visual Studio Community 8.5
Visual Studio 社区 8.5
Xamarin.Forms 4.5.0.396
Xamarin.Forms 4.5.0.396
Min API 21
最小 API 21
Target API 29
目标 API 29
Turns out that R8
is removing this method for some reason.事实证明,由于某种原因,
R8
正在删除此方法。 Adding the following Proguard
rule fixed the issue:添加以下
Proguard
规则修复了该问题:
-keep class com.xamarin.forms.platform.android.** {*;}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.