Search Unity

IL2CPP does missing some Reflection method implementations

Discussion in 'Android' started by JoathrentStudios, Sep 29, 2018.

  1. JoathrentStudios

    JoathrentStudios

    Joined:
    Jan 27, 2018
    Posts:
    23
    Was having issues using newtonsoft JSON library in my project which I have used before and traced it to the IL2CPP implementation. Switched project to use Mono for scripting backend and it works fine.

    09-29 05:54:51.307 17636 17671 E Unity : NotSupportedException: C:\Program Files\Unity\Hub\Editor\2018.2.8f1\Editor\Data\il2cpp\libil2cpp\icalls\mscorlib\System.Reflection.Emit\DynamicMethod.cpp(19) : Unsupported internal call for IL2CPP:DynamicMethod::create_dynamic_method - System.Reflection.Emit is not supported.
    09-29 05:54:51.307 17636 17671 E Unity : at System.Reflection.Emit.DynamicMethod.CreateDynMethod () [0x00000] in <00000000000000000000000000000000>:0
    09-29 05:54:51.307 17636 17671 E Unity : at System.Reflection.Emit.DynamicMethod.CreateDelegate (System.Type delegateType) [0x00000] in <00000000000000000000000000000000>:0
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,935
    IL2CPP does not support JIT compilation or dynamic code generation, so the the System.Reflection.Emit namespace is not supported. If you need to use dynamic code generation, then Mono is the proper choice for your project.