首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Xamarin窗体部署错误无法加载程序集“System.Memory”

Xamarin窗体部署错误无法加载程序集“System.Memory”
EN

Stack Overflow用户
提问于 2018-06-29 08:36:27
回答 1查看 1.9K关注 0票数 1

Xamarin形成Android

最近的nuget包级别导致了这个错误。我们只使用稳定的包,但我开始尝试最近的Xamarin预发布包,看看问题是否已经解决。

生成和调试部分的输出有错误。

装载机探测位置:“System.Memory”。 07-06 10: 10:10:51.972 F/单机器人程序集( 4029):无法在启动注册期间加载程序集“System.Memory”。

编译设置为使用最新版本(8.1),最低版本为7.0

在其他帖子中,我尝试删除共享运行时,并尝试使用已使用的共享运行时检查Android选项。

编辑3: Debug:的更新输出

07-06 10:10:48.375 D/Mono ( 4029):'/storage/emulated/0/Android/data/com.Oxando.OxandoXPC/files/.override/Xamarin.Forms.Platform.dll.so‘:图像未找到: dlopen失败:库"/data/app/com.Oxando.OxandoXPC-xDHzK4ivf73vZ_mvi0X4Jg==/lib/x86/libaot-Xamarin.Forms.Platform.dll.so“未找到07-06 10:10:48.376 D/Mono ( 4029):图像'/usr/local/lib/mono/aot-cache/x86/Xamarin.Forms.Platform.dll.so‘未找到: dlopen失败:库"/data/app/com.Oxando.OxandoXPC-xDHzK4ivf73vZ_mvi0X4Jg==/lib/x86/libaot-Xamarin.Forms.Platform.dll.so“未找到07-06 10:10:48.376 D/Mono ( 4029):装载机从位置加载程序集:'/storage/emulated/0/Android/data/com.Oxando.OxandoXPC/files/.override/Xamarin.Forms.Platform.dll'.07-06 10:10:48.376 D/Mono ( 4029):试图解析的配置:'/storage/emulated/0/Android/data/com.Oxando.OxandoXPC/files/.override/Xamarin.Forms.Platform.dll.config'.07-06 10:10:48.376 D/Mono ( 4029):试图解析的配置:'/usr/local/etc/mono/assemblies/Xamarin.Forms.Platform/Xamarin.Forms.Platform.config'.07-06 10:10:48.376 D/Mono ( 4029):装载机探测位置:'/storage/emulated/0/Android/data/com.Oxando.OxandoXPC/files/.override/Xamarin.Forms.Xaml.dll'.07-06 10:10:48.376 D/Mono ( 4029):图像addref /storage/emulated/0/Android/data/com.Oxando.OxandoXPC/files/.override/Xamarin.Forms.Xaml.dll0xcbf50400: Xamarin.Forms.Xaml0xcbf3d2c0 -> 2 07-06 10:10:48.376 D/Mono ( 4029):准备建立组装'Xamarin.Forms.Xaml‘(/storage/emulated/0/Android/data/com.Oxando.OxandoXPC/files/.overrideE217/xamarin.Forms.Xaml.dll) 07-06 10:10:48.376 D/Mono ( 4029):程序集Xamarin.Forms.Xaml0xcbf3d2c0添加到域RootDomain,'/storage/emulated/0/Android/data/com.Oxando.OxandoXPC/files/.override/Xamarin.Forms.Xaml.dll.so‘07-06 10:10:48.377 D/Mono ( 4029):ref_count=1 :图像未找到: dlopen失败:库"/data/app/com.Oxando.OxandoXPC-xDHzK4ivf73vZ_mvi0X4Jg==/lib/x86/libaot-Xamarin.Forms.Xaml.dll.so“未找到07-06 10:10:48.378 D/Mono ( 4029 )):图像'/usr/local/lib/mono/aot-cache/x86/Xamarin.Forms.Xaml.dll.so‘未找到: dlopen失败:库"/data/app/com.Oxando.OxandoXPC-xDHzK4ivf73vZ_mvi0X4Jg==/lib/x86/libaot-Xamarin.Forms.Xaml.dll.so“未找到07-06 10:10:48.378 D/Mono ( 4029):装载机从位置加载程序集:'/storage/emulated/0/Android/data/com.Oxando.OxandoXPC/files/.override/Xamarin.Forms.Xaml.dll'.07-06 10:10:48.378 D/Mono ( 4029):试图解析的配置:'/storage/emulated/0/Android/data/com.Oxando.OxandoXPC/files/.override/Xamarin.Forms.Xaml.dll.config'.07-06 10:10:48.378 D/Mono ( 4029):试图解析的配置:'/usr/local/etc/mono/assemblies/Xamarin.Forms.Xaml/Xamarin.Forms.Xaml.config'.07-06 10:10:48.378 D/Mono ( 4029):装载机探测位置:'/storage/emulated/0/Android/data/com.Oxando.OxandoXPC/files/.override/System.Memory.dll'.07-06 10:10:48.378 D/Mono ( 4029):图像addref /storage/emulated/0/Android/data/com.Oxando.OxandoXPC/files/.override/System.Memory.dll0xcbf50e00: System.Memory0xcbf3d4a0 -> 2 07-06 10:10:48.378 D/Mono ( 4029):装配的图像'System.Memory‘ReferenceAssemblyAttribute,跳过07-06 10:10:48.378 D/Mono ( 4029):卸载图像/storage/emulated/0/Android/data/com.Oxando.OxandoXPC/files/.override/System.Memory.dll 0xcbf50e00。07-06 10:10:48.379 D/Mono ( 4029):装载机探测位置:‘/usr/local/lib/System.Memory.dll’.加载程序集: /storage/emulated/0/Android/data/com.Oxando.OxandoXPC/files/.override/SQLitePCLRaw.batteries_green.dll外部.

..。

装配装载机探测位置:“System.Memory”。07-06 10:10:51.972 F/单机器人装配( 4029):在启动注册过程中无法加载程序集“System.Memory”。07-06 10:10:51.972 F/单机器人程序集( 4029):这可能是由于调试安装无效所致。07-06 10:10:51.972 F/单机器人总成( 4029):一个常见的原因是“亚行直接安装”应用程序,而不是直接从IDE安装。

EN

回答 1

Stack Overflow用户

发布于 2018-07-05 12:22:52

代码语言:javascript
复制
Can you try this Go to android Project>Right the Properties>Go to Android options>Advanced>In supported architecture tick all and set Java max Heap Size to 1 G if that not working can you try this 


This seemed to work for me. I will have to do more testing when I get time. Found it on the EF Core git bug lists.

Manually edit your csproj file and define, that the NU1605 warning shouldn't be treated as an error.

<PropertyGroup>
  <NoWarn>$(NoWarn);NU1605</NoWarn>
</PropertyGroup>
Now in your Project File add the Package:

<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.3.0" />
Then I would:

Clean the NuGet Caches
Clean all bin and obj folders
Restore the Packages
Build
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51097564

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档