0

我正在使用 MAUI 和 Visual Studio 2022 Preview 开发应用程序。当我在我的 Windows 笔记本电脑上运行时,好的。
此外,如果我在 Android 设备上点击并启动该应用程序(没有调试),它会正常运行。
但是当我在我的物理 Android 设备上运行调试时,它会抛出这个异常:

$exception  {System.IO.FileNotFoundException: 
File name: 'System.Private.CoreLib.resources'
   at System.Reflection.Assembly.Load(AssemblyName assemblyRef, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext)
   at System.Reflection.RuntimeAssembly.InternalGetSatelliteAssembly(Assembly assembly, CultureInfo culture, Version version, Boolean throwOnFileNotFound)} System.IO.FileNotFoundException

截屏

我启用了所有公共语言运行时异常: 异常设置

[monodroid-assembly] open_from_bundles: failed to load assembly pt/System.Private.CoreLib.resources.dll
**System.IO.FileNotFoundException:** ''

[monodroid-assembly] open_from_bundles: failed to load assembly pt/System.Private.CoreLib.resources.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Runtime.Serialization.Primitives.dll
[monodroid-assembly] open_from_bundles: failed to load assembly pt-BR/System.Private.DataContractSerialization.resources.dll
**System.IO.FileNotFoundException:** ''

[monodroid-assembly] open_from_bundles: failed to load assembly pt-BR/System.Private.DataContractSerialization.resources.dll

如何解决这个问题?

4

0 回答 0