Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

IL2CPP build ERROR - Unity5.3.5f1 Personal Version

Discussion in 'iOS and tvOS' started by unity-netpyoung, Jun 28, 2016.

  1. unity-netpyoung

    unity-netpyoung

    Joined:
    May 29, 2013
    Posts:
    3
    uname -a
    Darwin pyoung.local 15.5.0 Darwin Kernel Version 15.5.0: Tue Apr 19 18:36:36 PDT 2016; root:xnu-3248.50.21~8/RELEASE_X86_64 x86_64


    Unity5.3.5f1 Personal Version

    when i try to test that read excel from ios device, i got il2cpp fail message. but i don't know how il2cpp works.

    I get npoi from nuget


    https://www.nuget.org/packages/NPOI/

    then copy NPOI.2.2.1/net20/*.dll to my project. then i typed that code, and build ios

    Code (CSharp):
    1.  
    2. void Start () {
    3.         #if UNITY_EDITOR
    4.         string PATH = Application.dataPath + "/StreamingAssets";
    5.         #else
    6.         string PATH = Application.dataPath + "/Raw";
    7.         #endif
    8.         var bytes = File.ReadAllBytes (PATH + "/test.xlsx");
    9.  
    10.         var workbook = GetWorkbook(bytes);
    11.         var sheet = workbook.GetSheet("test_sheet1");
    12.         var row = sheet.GetRow(0);
    13.         var cell = row.GetCell(0);
    14.         cell.SetCellType(NPOI.SS.UserModel.CellType.String);
    15.         txt.text = cell.StringCellValue;
    16.     }
    17.  
    18.     NPOI.SS.UserModel.IWorkbook GetWorkbook(byte[] bytes)
    19.     {
    20.         using (var mem = new MemoryStream(bytes)) {
    21.             return new NPOI.XSSF.UserModel.XSSFWorkbook(mem);
    22.         }
    23.     }
    24.    

    i got fail message below




    IL2CPP error for method 'System.Xml.XmlDocument NPOI.Util.DocumentHelper::LoadDocument(System.IO.Stream)' in assembly '/Users/pyoung/@Test/test_npoi/Temp/StagingArea/Data/Managed/mscorlib.dll'
    Additional information: Build a development build for more information. An instruction cannot end both a catch and a finally block!








    so i try to find what it doesn't work from npoi github site.
    cus, i haven't enough know il2cpp, so i can't find anything

    https://github.com/tonyqus/npoi/blob/master/ooxml/openxml4Net/Util/DocumentHelper.cs
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,921
    @unity.netpyoung

    Can you submit a bug report via the Unity editor and include this project? This is not an issue we have seen before, and it looks like something we can correct. Thanks!
     
  3. Vaidas_B

    Vaidas_B

    Unity Technologies

    Joined:
    Jun 17, 2016
    Posts:
    18
    r618 likes this.
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,921