简体   繁体   English

ExecutionEngineException:尝试JIT编译方法

[英]ExecutionEngineException: Attempting to JIT compile method

public class StaticDataContainer<T> where T : IStaticData { 
protected static Dictionary<int, T> data;


public static void init(string jsonString){
    //It work fine in Unity,But in Xcode iOS,it will show an error below:
    //ExecutionEngineException: Attempting to JIT compile method
    //'System.Collections.Generic.Dictionary`2<int, AD>:.ctor ()' 
    //while running with --aot-only.
    data = new Dictionary<int, T> ();

I refer to: http://answers.unity3d.com/questions/250803/executionengineexception-attempting-to-jit-compile.html 我指的是: http : //answers.unity3d.com/questions/250803/executionengineexception-attempting-to-jit-compile.html

Your application makes use of some generic type that was missed during AOT compile. 您的应用程序利用了AOT编译期间遗漏的某些通用类型。 And solution is:The problem can usually be fixed by including a "dummy" class that references the missing types. 解决方法是:通常可以通过包含引用缺失类型的“虚拟”类来解决该问题。

But I dont' know what dummy class is. 但是我不知道什么是哑班。 How can I solve it? 我该如何解决?

Here's how I do it. 这是我的方法。 I create a file with name AOTDummy.cs in a project with following structure (adapted for your problem): 我在具有以下结构的项目中创建了一个名称为AOTDummy.cs的文件(适用于您的问题):

public static class AOTDummy
{
    public static void Dummy()
    {
        System.Collections.Generic.Dictionary<int, AD> dummy01;
    }
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 HttpClient执行运行时错误:ExecutionEngineException-尝试使用--aot-only进行JIT编译方法 - HttpClient execution runtime error: ExecutionEngineException - Attempting to JIT compile method with --aot-only System.ExecutionEngineException:仅在设备上的调试模式下尝试JIT编译方法(MonoTouch) - System.ExecutionEngineException: Attempting to JIT compile method only in Debug Mode on device (MonoTouch) 尝试在MonoTouch.CoreGraphics.CGContext.DrawPDFPage中进行JIT编译方法异常 - Attempting to JIT compile method exception in MonoTouch.CoreGraphics.CGContext.DrawPDFPage Protobuf-net尝试JIT编译方法&#39;(包装动态方法)ClassExtensions.StringArray - Protobuf-net Attempting to JIT compile method '(wrapper dynamic-method) ClassExtensions.StringArray 试图使用JIT编译方法&#39;(包装器委托调用) - System.Net.HttpWebRequest - Attempting to JIT compile method '(wrapper delegate-invoke) - System.Net.HttpWebRequest [MonoTouch] [Bass.dll]应用程序崩溃“尝试使用-aot-only运行JIT编译方法.. - [MonoTouch][Bass.dll] Application crash “Attempting to JIT compile method .. while running with --aot-only” Xamarion IOS LexDB Save-尝试进行JIT编译的异常(包装委托调用) - Xamarion IOS LexDB Save - exception attempting to JIT compile (wrapper delegate-invoke) 调用method_getImplementation会在设备上引发ExecutionEngineException - Calling method_getImplementation throws ExecutionEngineException on device 第三方库的Unity / Monotouch / C#设置委托中的JIT编译方法错误 - JIT compile method error in Unity/Monotouch/C# setting delegate for 3rd party library 解决方法以避免Xamarin iOS上的JIT编译限制 - Workaround to avoid JIT compile limit on Xamarin iOS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM