在 aot-only 模式下尝试 JIT 编译方法 'Akavache.Sqlite3.Registrations:Register (Splat.IMutableDependencyResolver)' 而 运行

Attempting to JIT compile method 'Akavache.Sqlite3.Registrations:Register (Splat.IMutableDependencyResolver)' while running in aot-only mode

The type initializer for 'Akavache.BlobCache' threw an exception.
Attempting to JIT compile method 'Akavache.Sqlite3.Registrations:Register (Splat.IMutableDependencyResolver)' while running in aot-only mode. See https://docs.microsoft.com/xamarin/ios/internals/limitations for more information.

在实际设备上调试 运行 时,一旦调用以下代码,就会立即反驳上述错误

Akavache.Registrations.Start("AppName");

试图在

中执行

都抛出相同的错误

知道为什么会调用 JIT 吗?

谢谢

splat v7.1 有一个修复,正在更新 akavache 以便在此 PR 中使用它 https://github.com/reactiveui/Akavache/pull/472

还值得注意以下错误https://github.com/reactiveui/splat/issues/292

  • akavache v6.4.1
  • ReactiveUI 9.11.3
  • 不需要像某些人提到的那样将 akavache 安装到平台项目
  • 清洁解决方案(重要)

问题已解决

感谢@Glenn Watson