Search Unity

Android Build Error

Discussion in 'Scripting' started by olegzheleztsov, Nov 2, 2017.

  1. olegzheleztsov

    olegzheleztsov

    Joined:
    Oct 15, 2017
    Posts:
    9
    When building a project on Android, the build fails with errors


    Code (CSharp):
    1. Exception: ExtractAssemblyTypeInfo: Failed to process Library/ScriptAssemblies/Assembly-CSharp-firstpass.dll, System.MissingMethodException: Method 'Unity.SerializationLogic.TypeResolver..ctor' not found.
    2.   at
    3. UnityEditor.AssemblyHelper.ExtractAssemblyTypeInfo (UnityEditor.BuildTarget targetPlatform, System.Boolean isEditor, System.String assemblyPathName, System.String[] searchDirs) [0x00055]
    4. in C:\buildslave\unity\build\Editor\Mono\AssemblyHelper.cs:333
    5. UnityEditor.AssemblyHelper.ExtractAssemblyTypeInfo (UnityEditor.BuildTarget targetPlatform, System.Boolean isEditor, System.String assemblyPathName, System.String[] searchDirs)
    6.  (at C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:344)
    7. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    8.  
    9.  
    10. Error building player because script class layout might be incompatible between the editor and the player.
    11.  
    12.  
    13. Build completed with a result of 'Failed'
    14. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    15.  
    16.  
    17. UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
    18.   at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00207] in
    19. C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:172
    20.  
    21.   at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00050]
    22.  
    23.  in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:83
    24. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    25.  



    Building on iOS passes without problems.
    What can be wrong?

    Unity 2017.2
    Scripting Runtime Version: Experimental(.NET 4.6 Equivalent)
    Scripting Backed: Mono
    Api Compatibility Level: .NET 4.6
     
  2. BlackPete

    BlackPete

    Joined:
    Nov 16, 2016
    Posts:
    970
    Hm interesting. I'm also using 2017.2 to make Android builds and had no problems. The one thing I haven't done is set API compatibility to .Net 4.6.

    Is temporarily switching it to 3.5 an option to see if this error goes away?
     
  3. olegzheleztsov

    olegzheleztsov

    Joined:
    Oct 15, 2017
    Posts:
    9
    I'm intensively using C# 6 syntax, a lot of code will have to be rewritten to an older syntax
     
  4. iamvideep

    iamvideep

    Joined:
    Oct 27, 2017
    Posts:
    118
    Whats up with this class?

    Ideally I use dotnet 2.0.
    Maybe those fancy classes are creating conflicts with .NET and android.
     
  5. Prof_Daniel

    Prof_Daniel

    Joined:
    Dec 1, 2017
    Posts:
    1
    For teste im trying export an default empty project and have the same error, its not the code, its this fu.. trash update, in my home machine i can export on work cant, now im scared to migrate my projects from work to home bcouse this bug likeli virus, im try export to other machine in work (these machine export apk widouth problem before, after migrate the same but bug apear!
    Hei devz what you do, go us to unreal???
     
  6. olegzheleztsov

    olegzheleztsov

    Joined:
    Oct 15, 2017
    Posts:
    9
    Downgrade from Unity 2017.2 => Unity 2017.1 solve problem both iOS and Android
     
  7. RobertPastiss

    RobertPastiss

    Joined:
    Dec 23, 2017
    Posts:
    2
    For me it was because my Windows 10 N was not up to date....