Ios 例外情况';正在尝试JIT编译方法,同时使用--aot only';使用Google.ProtocolBuffersLite
我在Unity3d项目中使用的类库中使用Google.ProtocolBuffersLite。 在IOS上尝试在应用程序的myClass.cs中使用ParseFrom(System.Byte[]data)函数时,我遇到以下异常:Ios 例外情况';正在尝试JIT编译方法,同时使用--aot only';使用Google.ProtocolBuffersLite,ios,mono,unity3d,protocol-buffers,aot,Ios,Mono,Unity3d,Protocol Buffers,Aot,我在Unity3d项目中使用的类库中使用Google.ProtocolBuffersLite。 在IOS上尝试在应用程序的myClass.cs中使用ParseFrom(System.Byte[]data)函数时,我遇到以下异常: ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Collections.Generic.EqualityComp
---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Collections.Generic.EqualityComparer`1
---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.ExecutionEngineException: Attempting to JIT compile method 'System.Collections.Generic.GenericEqualityComparer`1<Google.ProtocolBuffers.ExtensionRegistry/ExtensionIntPair>:.ctor ()' while running with --aot-only.
at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
at System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
at System.Reflection.ConstructorInfo.Invoke (System.Object[] parameters) [0x00000] in <filename unknown>:0
at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x00000] in <filename unknown>:0
at System.Activator.CreateInstance (System.Type type) [0x00000] in <filename unknown>:0
at System.Collections.Generic.EqualityComparer`1[Google.ProtocolBuffers.ExtensionRegistry+ExtensionIntPair]..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Collections.Generic.Dictionary`2[Google.ProtocolBuffers.ExtensionRegistry+ExtensionIntPair,Google.ProtocolBuffers.IGeneratedExtensionLite].Init (Int32 capacity, IEqualityComparer`1 hcp) [0x00000] in <filename unknown>:0
at System.Collections.Generic.Dictionary`2[Google.ProtocolBuffers.ExtensionRegistry+ExtensionIntPair,Google.ProtocolBuffers.IGeneratedExtensionLite]..ctor () [0x00000] in <filename unknown>:0
at Google.ProtocolBuffers.ExtensionRegistry..cctor () [0x00000] in <filename unknown>:0 Exception.Message: An exception was thrown by the type initializer for Google.ProtocolBuffers.ExtensionRegistry
at Google.ProtocolBuffers.AbstractBuilderLite`2[TMessage,TBuilder].MergeFrom (System.Byte[] data) [0x00000] in <filename unknown>:0
-->System.TypeInitializationException:System.Collections.Generic.EqualityComparer`1的类型初始值设定项引发了异常
--->System.Reflection.TargetInvocationException:调用的目标已引发异常。
--->System.ExecutionEngineeException:尝试在仅使用--aot运行时JIT编译方法“System.Collections.Generic.GenericEqualityComparer`1:.ctor()”。
在System.Reflection.MonoCMethod.Invoke(System.Object obj、BindingFlags invokeAttr、System.Reflection.Binder Binder、System.Object[]参数、System.Globalization.CultureInfo区域性)[0x00000]中:0
---内部异常堆栈跟踪的结束---
在System.Reflection.MonoCMethod.Invoke(System.Object obj、BindingFlags invokeAttr、System.Reflection.Binder Binder、System.Object[]参数、System.Globalization.CultureInfo区域性)[0x00000]中:0
在System.Reflection.MonoCMethod.Invoke(BindingFlags invokeAttr、System.Reflection.Binder Binder、System.Object[]参数、System.Globalization.CultureInfo区域性)[0x00000]中:0
在:0中的System.Reflection.ConstructorInfo.Invoke(System.Object[]参数)[0x00000]处
在:0中的System.Activator.CreateInstance(System.Type类型,布尔非公共)[0x00000]处
在0中的System.Activator.CreateInstance(System.Type类型)[0x00000]处
位于System.Collections.Generic.EqualityComparer`1[Google.ProtocolBuffers.ExtensionRegistry+ExtensionIntPair]…cctor()[0x00000]中:0
---内部异常堆栈跟踪的结束---
位于System.Collections.Generic.Dictionary`2[Google.ProtocolBuffers.ExtensionRegistry+ExtensionIntPair,Google.ProtocolBuffers.IGeneratedExtensionLite].Init(Int32容量,IEqualityComparer`1 hcp)[0x00000]中:0
位于System.Collections.Generic.Dictionary`2[Google.ProtocolBuffers.ExtensionRegistry+ExtensionIntPair,Google.ProtocolBuffers.IGeneratedExtensionLite]…ctor()[0x00000]中:0
在Google.ProtocolBuffers.ExtensionRegistry..cctor()[0x00000]中:0异常。消息:Google.ProtocolBuffers.ExtensionRegistry的类型初始值设定项引发了异常
在Google.ProtocolBuffers.AbstractBuilderLite`2[TMessage,TBuilder].MergeFrom(System.Byte[]data)[0x00000]中:0
使用protocolBuffersLite的过程是:
你好,来自乌拉圭,你有办法让它发挥作用吗?