Я изо всех сил стараюсь заставить Царство работать, но я застрял и понятия не имею, что я делаю неправильно.
- Я установил пакет Realm nuget во всех трех проектах (общий код, Android и iOS)
- Вручную создал файл FodyWeavers.xml с правильным содержимым и скопировал его в проект Android и iOS *
При попытке подключиться к Realm с помощью этого кода:
var realm = Realms.GetInstance();
Приложение вылетит. Почему это происходит? Я прочитал полную документацию 3 раза и не могу найти то, что мне здесь не хватает.
Спасибо за помощь
Вывод отладки:
Start App1.Android, HUAWEI WAS-LX1 Player, .
Attempting connection to debug address: 192.168.0.102:37847.
Connected to: 192.168.0.102:37847.
Deploying C:\Users\Matto\source\repos\App1\App1\App1.Android\App1.Android.csproj...
Got device info: HUAWEI WAS-LX1 Player (Android) @ 192.168.0.102:37847
Synchronizing files...
Building and running...
Built with 0 messages.
Deploy to HUAWEI WAS-LX1 Player succeeded.
Unhandled Exception:
System.Reflection.TargetInvocationException: <Timeout exceeded getting exception details>
Отловленное исключение:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetException: Object of type 'NInterpret.InterpretedObject' doesn't match target type 'System.Collections.Generic.List`1[NInterpret.InterpretedObject]' at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)
[0x0004f] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters)
[0x00000] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at NInterpret.Interpreter.callAMethod (NInterpret.AMethod m, NInterpret.AType[] ptypes, NInterpret.AType[] genericMethodArgs, System.Collections.Generic.Dictionary`2[TKey,TValue] genericArgsIndex, System.Object[] args, System.Collections.Generic.List`1[T] byRefArgs, Microsoft.FSharp.Core.FSharpOption`1[T] byRefTarget, System.Object target, System.Boolean virtualCall)
[0x0046a] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0 at NInterpret.Interpreter.callMethodReference (System.Collections.Generic.Dictionary`2[TKey,TValue] gargs, Mono.Cecil.MethodReference ms, System.Boolean virtualCall)
[0x00384] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0 at NInterpret.Interpreter.interpretBlock (System.Object[] args, System.Object[] locals, Mono.Cecil.Cil.Instruction initialInstruction, Microsoft.FSharp.Collections.FSharpSet`1[T] inTries, Microsoft.FSharp.Core.FSharpOption`1[T] lastException)
[0x00fb7] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0 at NInterpret.Interpreter.interpret (System.Object[] args)
[0x00099] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0 at NInterpret.Interpreter.callAMethod (NInterpret.AMethod m, NInterpret.AType[] ptypes, NInterpret.AType[] genericMethodArgs, System.Collections.Generic.Dictionary`2[TKey,TValue] genericArgsIndex, System.Object[] args, System.Collections.Generic.List`1[T] byRefArgs, Microsoft.FSharp.Core.FSharpOption`1[T] byRefTarget, System.Object target, System.Boolean virtualCall)
[0x00184] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0 at NInterpret.Interpreter.callMethodReference (System.Collections.Generic.Dictionary`2[TKey,TValue] gargs, Mono.Cecil.MethodReference ms, System.Boolean virtualCall)
[0x00384] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0 at NInterpret.Interpreter.interpretBlock (System.Object[] args, System.Object[] locals, Mono.Cecil.Cil.Instruction initialInstruction, Microsoft.FSharp.Collections.FSharpSet`1[T] inTries, Microsoft.FSharp.Core.FSharpOption`1[T] lastException)
[0x03c6e] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0 at NInterpret.Interpreter.interpret (System.Object[] args)
[0x00099] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0 at NInterpret.Interpreter.callAMethod (NInterpret.AMethod m, NInterpret.AType[] ptypes, NInterpret.AType[] genericMethodArgs, System.Collections.Generic.Dictionary`2[TKey,TValue] genericArgsIndex, System.Object[] args, System.Collections.Generic.List`1[T] byRefArgs, Microsoft.FSharp.Core.FSharpOption`1[T] byRefTarget, System.Object target, System.Boolean virtualCall)
[0x00184] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0 at NInterpret.Interpreter.callMethodReference (System.Collections.Generic.Dictionary`2[TKey,TValue] gargs, Mono.Cecil.MethodReference ms, System.Boolean virtualCall)
[0x00384] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0 at NInterpret.Interpreter.interpretBlock (System.Object[] args, System.Object[] locals, Mono.Cecil.Cil.Instruction initialInstruction, Microsoft.FSharp.Collections.FSharpSet`1[T] inTries, Microsoft.FSharp.Core.FSharpOption`1[T] lastException)
[0x00fb7] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0 at NInterpret.Interpreter.interpret (System.Object[] args)
[0x00099] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0 at NInterpret.Interpreter.callAMethod (NInterpret.AMethod m, NInterpret.AType[] ptypes, NInterpret.AType[] genericMethodArgs, System.Collections.Generic.Dictionary`2[TKey,TValue] genericArgsIndex, System.Object[] args, System.Collections.Generic.List`1[T] byRefArgs, Microsoft.FSharp.Core.FSharpOption`1[T] byRefTarget, System.Object target, System.Boolean virtualCall)
[0x00184] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0 at NInterpret.Interpreter.NInterpret-IInterpreter-TryCall (System.Object o, NInterpret.InterpretedTypeInfo i, System.String n, System.Type[] p, System.Object[] a, System.Type[] ma)
[0x001b1] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0 at NInterpret.InterpretedDelegate.InterpretDelegate (NInterpret.IInterpreter interp, NInterpret.IInterpretedObject o, NInterpret.InterpretedTypeInfo i, System.String n, System.Type[] p, System.Object[] a)
[0x0001b] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0 at (wrapper dynamic-method) System.Object:lambda_method (System.Runtime.CompilerServices.Closure) at System.Lazy`1[T].CreateValue ()
[0x00060] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw ()
[0x0000c] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at System.Lazy`1[T].get_Value ()
[0x00020] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)
[0x00032] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 --- End of inner exception stack trace --- at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)
[0x0004b] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters)
[0x00000] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at NInterpret.Interpreter.callAMethod (NInterpret.AMethod m, NInterpret.AType[] ptypes, NInterpret.AType[] genericMethodArgs, System.Collections.Generic.Dictionary`2[TKey,TValue] genericArgsIndex, System.Object[] args, System.Collections.Generic.List`1[T] byRefArgs, Microsoft.FSharp.Core.FSharpOption`1[T] byRefTarget, System.Object target, System.Boolean virtualCall)
[0x003f7] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0 at NInterpret.Interpreter.callMethodReference (System.Collections.Generic.Dictionary`2[TKey,TValue] gargs, Mono.Cecil.MethodReference ms, System.Boolean virtualCall)
[0x00384] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0 at NInterpret.Interpreter.interpretBlock (System.Object[] args, System.Object[] locals, Mono.Cecil.Cil.Instruction initialInstruction, Microsoft.FSharp.Collections.FSharpSet`1[T] inTries, Microsoft.FSharp.Core.FSharpOption`1[T] lastException)
[0x03c6e] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0 at NInterpret.Interpreter.interpret (System.Object[] args)
[0x00099] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0 at NInterpret.Interpreter.callAMethod (NInterpret.AMethod m, NInterpret.AType[] ptypes, NInterpret.AType[] genericMethodArgs, System.Collections.Generic.Dictionary`2[TKey,TValue] genericArgsIndex, System.Object[] args, System.Collections.Generic.List`1[T] byRefArgs, Microsoft.FSharp.Core.FSharpOption`1[T] byRefTarget, System.Object target, System.Boolean virtualCall)
[0x00184] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0 at NInterpret.Interpreter.callMethodReference (System.Collections.Generic.Dictionary`2[TKey,TValue] gargs, Mono.Cecil.MethodReference ms, System.Boolean virtualCall)
[0x00384] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0 at NInterpret.Interpreter.interpretBlock (System.Object[] args, System.Object[] locals, Mono.Cecil.Cil.Instruction initialInstruction, Microsoft.FSharp.Collections.FSharpSet`1[T] inTries, Microsoft.FSharp.Core.FSharpOption`1[T] lastException)
[0x00fb7] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0 at NInterpret.Interpreter.interpret (System.Object[] args)
[0x00099] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0 at NInterpret.Interpreter.callAMethod (NInterpret.AMethod m, NInterpret.AType[] ptypes, NInterpret.AType[] genericMethodArgs, System.Collections.Generic.Dictionary`2[TKey,TValue] genericArgsIndex, System.Object[] args, System.Collections.Generic.List`1[T] byRefArgs, Microsoft.FSharp.Core.FSharpOption`1[T] byRefTarget, System.Object target, System.Boolean virtualCall)
[0x00184] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0 at NInterpret.Interpreter.callMethodReference (System.Collections.Generic.Dictionary`2[TKey,TValue] gargs, Mono.Cecil.MethodReference ms, System.Boolean virtualCall)
[0x00384] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0 at NInterpret.Interpreter.interpretBlock (System.Object[] args, System.Object[] locals, Mono.Cecil.Cil.Instruction initialInstruction, Microsoft.FSharp.Collections.FSharpSet`1[T] inTries, Microsoft.FSharp.Core.FSharpOption`1[T] lastException)
[0x00fb7] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0 at NInterpret.Interpreter.interpret (System.Object[] args)
[0x00099] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0 at NInterpret.Interpreter.callAMethod (NInterpret.AMethod m, NInterpret.AType[] ptypes, NInterpret.AType[] genericMethodArgs, System.Collections.Generic.Dictionary`2[TKey,TValue] genericArgsIndex, System.Object[] args, System.Collections.Generic.List`1[T] byRefArgs, Microsoft.FSharp.Core.FSharpOption`1[T] byRefTarget, System.Object target, System.Boolean virtualCall)
[0x00184] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0 at NInterpret.Interpreter.callMethodReference (System.Collections.Generic.Dictionary`2[TKey,TValue] gargs, Mono.Cecil.MethodReference ms, System.Boolean virtualCall)
[0x00384] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0 at NInterpret.Interpreter.interpretBlock (System.Object[] args, System.Object[] locals, Mono.Cecil.Cil.Instruction initialInstruction, Microsoft.FSharp.Collections.FSharpSet`1[T] inTries, Microsoft.FSharp.Core.FSharpOption`1[T] lastException)
[0x00fb7] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0 at NInterpret.Interpreter.interpretBlock (System.Object[] args, System.Object[] locals, Mono.Cecil.Cil.Instruction initialInstruction, Microsoft.FSharp.Collections.FSharpSet`1[T] inTries, Microsoft.FSharp.Core.FSharpOption`1[T] lastException)
[0x0013c] in <5a7d38ec7eef0f2aa7450383ec387d5a>:0