小编Rey*_*eon的帖子

MAUI 应用程序在发布模式下无法工作,但在调试模式下完美工作

我的 MAUI 应用程序在模拟器中以调试模式运行时运行良好,但当我在发布模式下运行时它无法运行(在模拟器或物理设备中都不起作用)它崩溃了。

我正在使用Mvvm一个名为 的库来使用该架构CommunityToolkit.Mvvm。我提到这一点是因为我不知道这是否导致了问题。

我下载了一个Crash Log Viewer在我的物理设备中调用的应用程序来检查应用程序给出的崩溃和错误,但我收到了以下错误:

This information is generated from the Crash Log View application. - https://play.google.com/store/apps/details?id=com.arumcomm.crashlogviewer

Process: com.companyname.ventas_citel
PID: 12230
UID: 10313
Flags: 0x20c8be44
Package: com.companyname.ventas_citel v1 (1.0)
Foreground: No
Process-Runtime: 63820382
Build: samsung/a10sub/a10s:11/RP1A.200720.012/A107MUBU6CVG3:user/release-keys

android.runtime.JavaProxyThrowable: System.FieldAccessException: Field `Microsoft.Maui.Controls.VisualElement:ZIndexProperty' is inaccessible from method `Ventas_Citel.Views.Login.Login:InitializeComponent ()'

   at Ventas_Citel.Views.Login.Login..ctor(LoginViewModel viewModel)
   at System.Reflection.RuntimeConstructorInfo.InternalInvoke(Object , Object[] , Boolean )
   at System.Reflection.RuntimeConstructorInfo.DoInvoke(Object , BindingFlags , Binder , Object[] , CultureInfo )
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags , Binder , …
Run Code Online (Sandbox Code Playgroud)

c# maui community-toolkit-mvvm

10
推荐指数
3
解决办法
7428
查看次数

标签 统计

c# ×1

community-toolkit-mvvm ×1

maui ×1