Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

il2cpp.exe did not run properly

Discussion in 'Unity Cloud Build' started by HungPark, May 29, 2019.

  1. HungPark

    HungPark

    Joined:
    Feb 28, 2017
    Posts:
    52
    Hi!,

    After upgrading from Unity2017.3.1f1 to Unity2017.4.27f1, I got the following bug.

    "Exception: C:/Program Files\Unity\Hub\Editor\2017.4.27f1\Editor\Data\il2cpp/build/il2cpp.exe did not run properly."

    The last file "il2cpp.exe" is to get Microsoft Access. I don't need this Access because I don't need Microsoft PlayerPrefs. I think Unity player-prefs is enough for my app.

    So, can I delete this last file "il2cpp.exe" ? With deleting this file, can I kill this bug?

    I need your great help.
    Thank you.
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,035
    You don't want to delete that file, it is necessary to complete the player build process. Please have a look a the Unity Editor log file - it should have more information about the cause of this issue. You can find details about the location of the editor log file here: https://docs.unity3d.com/Manual/LogFiles.html
     
  3. HungPark

    HungPark

    Joined:
    Feb 28, 2017
    Posts:
    52
    Thank you for your fastest reply.

    I confirmed, https://docs.unity3d.com/Manual/LogFiles.html.

    But I could not find my Editor.log file. Mine is Windows10 and the path;

    C:\User\username\AppData\Unity\Editor, that is no more. I don't know if I deleted Editor.log file mistakenly.

    I remember deleting some useless files which might include this file. Anyway,
    I hope your instruction to fix this problem.

    Thank you so much.
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,035
    Try to reproduce the problem again in the Unity editor. That should cause the Editor.log file to be created. Then you can check for the error message immediately after the problem happens.

    Unfortunately I cannot offer any help until I know what the error message is.
     
  5. HungPark

    HungPark

    Joined:
    Feb 28, 2017
    Posts:
    52
    Hi,

    May I send all the error messages to you?

    Reproducing the problem means that I go back to Unity2017.3,1f1 and repeating upgrade?
    Thank you.
     
  6. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,035
    Yes, you can send the error messages here.

    Yes, you'll need to do whatever you did before to cause this issue.
     
  7. HungPark

    HungPark

    Joined:
    Feb 28, 2017
    Posts:
    52
    Mine is 2D android game app, and the error messages are;

    1. Console for IL2CPP;

    Failed running C:\Program Files\Unity\Hub\Editor\2017.4.27f1\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="Release" --outputpath="C:\Users\Hung So Park\Documents\The Tumbling Helius\Temp/StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="C:\Users\Hung So Park\Documents\The Tumbling Helius\Assets\..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2017.4.27f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2017.4.27f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="D:/android-ndk-r13b-windows-x86_64/android-ndk-r13b" --map-file-parser="C:\Program Files\Unity\Hub\Editor\2017.4.27f1\Editor\Data\Tools\MapFileParser\MapFileParser.exe" --assembly="C:\Users\Hung So Park\Documents\The Tumbling Helius\Temp\StagingArea\assets\bin\Data\Managed\Assembly-CSharp.dll" --assembly="C:\Users\Hung So Park\Documents\The Tumbling Helius\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.UI.dll" --assembly="C:\Users\Hung So Park\Documents\The Tumbling Helius\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.Analytics.dll" --assembly="C:\Users\Hung So Park\Documents\The Tumbling Helius\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.dll" --generatedcppdir="C:\Users\Hung So Park\Documents\The Tumbling Helius\Temp\StagingArea\Il2Cpp\il2cppOutput" .

    This is about a third of total messages. If you need more detailed information, I will send the rest part.


    2. Console for Mono;

    UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0020e] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:181
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00065] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:88
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr).

    Thank you.
     
  8. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,035
    Yes, I'll need more details to understand the cause.
     
  9. HungPark

    HungPark

    Joined:
    Feb 28, 2017
    Posts:
    52
    Hi,

    The remaining part for IL2CPP is;

    stdout:
    Building libil2cpp.so with AndroidToolChain.
    Output directory: C:\Users\Hung So Park\Documents\The Tumbling Helius\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a
    Cache directory: C:\Users\Hung So Park\Documents\The Tumbling Helius\Library\il2cpp_android_armeabi-v7a\il2cpp_cache
    il2cpp.exe didn't catch exception: System.AggregateException: One or more errors occurred. ---> System.ComponentModel.Win32Exception: The system cannot find the file specified
    at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    at Unity.IL2CPP.Building.CompilationInvocation.Execute()
    at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    at Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)
    --- End of inner exception stack trace ---
    at Unity.IL2CPP.Building.ParallelFor.RunWithResult[D,T](D[] data, Func`2 action)
    at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    at Unity.IL2CPP.Building.Statistics.BuildingTestRunnerHelper.BuildAndLogStatsForTestRunner(CppProgramBuilder builder, IBuildStatistics& statistics)
    at il2cpp.Program.DoRun(String[] args)
    at il2cpp.Program.Run(String[] args)
    at il2cpp.Program.Main(String[] args)
    ---> (Inner Exception #0) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
    at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    at Unity.IL2CPP.Building.CompilationInvocation.Execute()
    at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    at Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)<---

    ---> (Inner Exception #1) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
    at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    at Unity.IL2CPP.Building.CompilationInvocation.Execute()
    at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    at Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)<---

    ---> (Inner Exception #2) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified

    at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    at Unity.IL2CPP.Building.CompilationInvocation.Execute()
    at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    at Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)<---

    ---> (Inner Exception #3) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
    at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    at Unity.IL2CPP.Building.CompilationInvocation.Execute()
    at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    at Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)<---

    ---> (Inner Exception #4) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
    at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    at Unity.IL2CPP.Building.CompilationInvocation.Execute()
    at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    at Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)<---

    ---> (Inner Exception #6) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
    at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    at Unity.IL2CPP.Building.CompilationInvocation.Execute()
    at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    at Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)<---

    ---> (Inner Exception #7) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
    at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    at Unity.IL2CPP.Building.CompilationInvocation.Execute()
    at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    at Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)<---
    stderr:

    Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.ComponentModel.Win32Exception: The system cannot find the file specified
    at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    at Unity.IL2CPP.Building.CompilationInvocation.Execute()
    at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    at Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)
    --- End of inner exception stack trace ---
    at Unity.IL2CPP.Building.ParallelFor.RunWithResult[D,T](D[] data, Func`2 action)
    at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    at Unity.IL2CPP.Building.Statistics.BuildingTestRunnerHelper.BuildAndLogStatsForTestRunner(CppProgramBuilder builder, IBuildStatistics& statistics)
    at il2cpp.Program.DoRun(String[] args)
    at il2cpp.Program.Run(String[] args)
    at il2cpp.Program.Main(String[] args)

    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:336)
    UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(ICollection`1, String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:317)
    UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:160)
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:34)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)


    Exception: C:\Program Files\Unity\Hub\Editor\2017.4.27f1\Editor\Data\il2cpp/build/il2cpp.exe did not run properly!
    UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:130)
    UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1 setupStartInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1 arguments, System.Action`1 setupStartInfo, System.String workingDirectory) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:336)
    UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (ICollection`1 userAssemblies, System.String outputDirectory, System.String workingDirectory) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:317)
    UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:160)
    UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry, Boolean debugBuild) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:34)
    UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report)
    UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args)
    UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:272)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    Thank you.
     
  10. HungPark

    HungPark

    Joined:
    Feb 28, 2017
    Posts:
    52
    I add the following for IL2CPP;

    ---> (Inner Exception #5) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
    at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    at Unity.IL2CPP.Building.CompilationInvocation.Execute()
    at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    at Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)<---

    Thank you.
     
  11. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,035
    This likely means the Android NDK is not found or is installed incorrectly. It looks like Unity cannot locate the Android C++ compiler. Please re-install the NDK and make sure the preferences in the Unity editor point to the proper location of the NDK.
     
  12. HungPark

    HungPark

    Joined:
    Feb 28, 2017
    Posts:
    52
    Thank you so much, and I’ll try it.
    The results will be reported to you after trying it.

    Thank you.
     
  13. HungPark

    HungPark

    Joined:
    Feb 28, 2017
    Posts:
    52
    Hi,

    1. The NDK is trying to be reinstalled in the following path for Unity Editor and Android Studio:

    C:\Program Files\android-ndk-r13b-windows-x86_64\android-ndk-r13b

    2. There are another bugs as follows:

    1) for Android NDK;
    "Android NDK location should not contain whitespace, as this can cause problems with NDK tools", that is, it does not accept the above path.

    2) for Unity Editor;
    It accepts the above mentioned path, but it brought the following Bugs;


    Failed running C:\Program Files\Unity\Hub\Editor\2017.4.27f1\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="Release" --outputpath="C:\Users\Hung So Park\Documents\The Tumbling Helius\Temp/StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="C:\Users\Hung So Park\Documents\The Tumbling Helius\Assets\..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2017.4.27f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2017.4.27f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="C:/Program Files/android-ndk-r13b-windows-x86_64/android-ndk-r13b" --map-file-parser="C:\Program Files\Unity\Hub\Editor\2017.4.27f1\Editor\Data\Tools\MapFileParser\MapFileParser.exe" --assembly="C:\Users\Hung So Park\Documents\The Tumbling Helius\Temp\StagingArea\assets\bin\Data\Managed\Assembly-CSharp.dll" --assembly="C:\Users\Hung So Park\Documents\The Tumbling Helius\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.UI.dll" --assembly="C:\Users\Hung So Park\Documents\The Tumbling Helius\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.Analytics.dll" --assembly="C:\Users\Hung So Park\Documents\The Tumbling Helius\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.dll" --generatedcppdir="C:\Users\Hung So Park\Documents\The Tumbling Helius\Temp\StagingArea\Il2Cpp\il2cppOutput"

    stdout:
    Building libil2cpp.so with AndroidToolChain.
    Output directory: C:\Users\Hung So Park\Documents\The Tumbling Helius\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a
    Cache directory: C:\Users\Hung So Park\Documents\The Tumbling Helius\Library\il2cpp_android_armeabi-v7a\il2cpp_cache
    il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: In file included from C:\Users\Hung So Park\Documents\The Tumbling Helius\Temp\StagingArea\Il2Cpp\il2cppOutput\Il2CppMetadataUsage.cpp:11:
    In file included from C:\Program Files\Unity\Hub\Editor\2017.4.27f1\Editor\Data\il2cpp\libil2cpp\codegen/il2cpp-codegen.h:54:
    In file included from C:\Program Files\Unity\Hub\Editor\2017.4.27f1\Editor\Data\il2cpp\libil2cpp\codegen/il2cpp-codegen-il2cpp.h:3:
    C:\Program Files\Unity\Hub\Editor\2017.4.27f1\Editor\Data\il2cpp\libil2cpp\codegen/il2cpp-codegen-common.h:5:10: fatal error: 'cassert' file not found
    #include <cassert>
    ^
    1 error generated.


    Invocation was: Executable: "C:\Program Files\android-ndk-r13b-windows-x86_64\android-ndk-r13b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++"
    Arguments: -DGC_NOT_DLL -DRUNTIME_IL2CPP -DLINUX -DANDROID -DPLATFORM_ANDROID -D__linux__ -D__STDC_FORMAT_MACROS -I"C:\Program Files\Unity\Hub\Editor\2017.4.27f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\bdwgc\include" -I"C:\Program Files\Unity\Hub\Editor\2017.4.27f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\libil2cpp\include" -I"C:\Program Files\Unity\Hub\Editor\2017.4.27f1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Hub\Editor\2017.4.27f1\Editor\Data\il2cpp\external\boehmgc\include" -I"C:\Users\Hung So Park\Documents\The Tumbling Helius\Temp\StagingArea\Il2Cpp\il2cppOutput" -I"." -I"C:\Program Files\android-ndk-r13b-windows-x86_64\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\include" -I"C:\Program Files\android-ndk-r13b-windows-x86_64\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\include\backward" -I"C:\Program Files\android-ndk-r13b-windows-x86_64\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a\include" -c -g -DNDEBUG -funwind-tables -fno-limit-debug-info -fPIC -fdata-sections -ffunction-sections -Wa,--noexecstack -fno-rtti -std=c++98 -fno-strict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -fno-strict-overflow -fPIE -Os --sysroot "C:\Program Files\android-ndk-r13b-windows-x86_64\android-ndk-r13b\platforms\android-16\arch-arm" -gcc-toolchain "C:\Program Files\android-ndk-r13b-windows-x86_64\android-ndk-r13b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -mfpu=neon -march=armv7-a -mfloat-abi=softfp -mfpu=vfp "C:\Users\Hung So Park\Documents\The Tumbling Helius\Temp\StagingArea\Il2Cpp\il2cppOutput\Il2CppMetadataUsage.cpp" -o "C:\Users\Hung So Park\Documents\The Tumbling Helius\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\CF4C88B73FE5D1B6A6D0EF6DC2649275.o"

    at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    at Unity.IL2CPP.Building.Statistics.BuildingTestRunnerHelper.BuildAndLogStatsForTestRunner(CppProgramBuilder builder, IBuildStatistics& statistics)
    at il2cpp.Program.DoRun(String[] args)
    at il2cpp.Program.Run(String[] args)
    at il2cpp.Program.Main(String[] args)
    stderr:

    Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException: In file included from C:\Users\Hung So Park\Documents\The Tumbling Helius\Temp\StagingArea\Il2Cpp\il2cppOutput\Il2CppMetadataUsage.cpp:11:
    In file included from C:\Program Files\Unity\Hub\Editor\2017.4.27f1\Editor\Data\il2cpp\libil2cpp\codegen/il2cpp-codegen.h:54:
    In file included from C:\Program Files\Unity\Hub\Editor\2017.4.27f1\Editor\Data\il2cpp\libil2cpp\codegen/il2cpp-codegen-il2cpp.h:3:
    C:\Program Files\Unity\Hub\Editor\2017.4.27f1\Editor\Data\il2cpp\libil2cpp\codegen/il2cpp-codegen-common.h:5:10: fatal error: 'cassert' file not found
    #include <cassert>
    ^
    1 error generated.
    Invocation was: Executable: "C:\Program Files\android-ndk-r13b-windows-x86_64\android-ndk-r13b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++"
    Arguments: -DGC_NOT_DLL -DRUNTIME_IL2CPP -DLINUX -DANDROID -DPLATFORM_ANDROID -D__linux__ -D__STDC_FORMAT_MACROS -I"C:\Program Files\Unity\Hub\Editor\2017.4.27f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\bdwgc\include" -I"C:\Program Files\Unity\Hub\Editor\2017.4.27f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\libil2cpp\include" -I"C:\Program Files\Unity\Hub\Editor\2017.4.27f1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Hub\Editor\2017.4.27f1\Editor\Data\il2cpp\external\boehmgc\include" -I"C:\Users\Hung So Park\Documents\The Tumbling Helius\Temp\StagingArea\Il2Cpp\il2cppOutput" -I"." -I"C:\Program Files\android-ndk-r13b-windows-x86_64\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\include" -I"C:\Program Files\android-ndk-r13b-windows-x86_64\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\include\backward" -I"C:\Program Files\android-ndk-r13b-windows-x86_64\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a\include" -c -g -DNDEBUG -funwind-tables -fno-limit-debug-info -fPIC -fdata-sections -ffunction-sections -Wa,--noexecstack -fno-rtti -std=c++98 -fno-strict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -fno-strict-overflow -fPIE -Os --sysroot "C:\Program Files\android-ndk-r13b-windows-x86_64\android-ndk-r13b\platforms\android-16\arch-arm" -gcc-toolchain "C:\Program Files\android-ndk-r13b-windows-x86_64\android-ndk-r13b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -mfpu=neon -march=armv7-a -mfloat-abi=softfp -mfpu=vfp "C:\Users\Hung So Park\Documents\The Tumbling Helius\Temp\StagingArea\Il2Cpp\il2cppOutput\Il2CppMetadataUsage.cpp" -o "C:\Users\Hung So Park\Documents\The Tumbling Helius\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\CF4C88B73FE5D1B6A6D0EF6DC2649275.o"

    at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    at Unity.IL2CPP.Building.Statistics.BuildingTestRunnerHelper.BuildAndLogStatsForTestRunner(CppProgramBuilder builder, IBuildStatistics& statistics)
    at il2cpp.Program.DoRun(String[] args)
    at il2cpp.Program.Run(String[] args)
    at il2cpp.Program.Main(String[] args)


    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:336)
    UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(ICollection`1, String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:317)
    UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:160)
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:34)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)


    Exception: C:\Program Files\Unity\Hub\Editor\2017.4.27f1\Editor\Data\il2cpp/build/il2cpp.exe did not run properly!
    UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:130)
    UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1 setupStartInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1 arguments, System.Action`1 setupStartInfo, System.String workingDirectory) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:336)
    UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (ICollection`1 userAssemblies, System.String outputDirectory, System.String workingDirectory) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:317)
    UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:160)
    UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry, Boolean debugBuild) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:34)
    UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report)
    UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args)
    UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:272)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)



    I am sorry for bothering you.
    Thank you.
     
  14. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,035
    It looks like there is still some NDK installation issue. Can you search the Android NDK directory for a file named "cassert"? It should exist there. Also, please make sure you have the proper version of the Android NDK for the version of Unity you are using. The Unity editor preferences dialog should tell you the proper version of the NDK.
     
  15. HungPark

    HungPark

    Joined:
    Feb 28, 2017
    Posts:
    52
    Thank you.

    My Ram will be up to 16gb from the present 8gb.
    The results will be reported.

    B.Regards,
     
  16. HungPark

    HungPark

    Joined:
    Feb 28, 2017
    Posts:
    52
    Hi, Mr. Peterson,

    You are right!
    I made a APK and OBB files successfully according to your guideline.

    The process as follows;

    1. The folders and files such as project folder, gradle file, apk file, and obb file are
    localized in
    C:/Users/User name/….

    2. The path in Unity Editor(Edit->Preferences),
    0 SDK:
    C:/Users/User Name/AppData/Local/Android/Sdk
    0 JDK:
    C:/Users/User Name/Java/jdk/1.8.0_211
    0 NDK:
    C:/Users/User Name/Downloads/android-ndk-r13b-windows-x86_64/android-ndk-r13b

    3. The path of NDK for Android Studio;
    File-> Project Structure -> Default NDK

    4. Others
    I referred the following sites.

    0 Building a project using IL2CPP (Unity Manual)
    0 App Manifest Overview(https://developer.android.com/guide/topics/manifest/manifest-intro/


    Mr. Peterson,
    I don't know how to express my appreciation for your help and guideline.
    Thank you again.

    B. Regards,
     
    JoshPeterson likes this.
  17. alirezakhaan

    alirezakhaan

    Joined:
    Dec 12, 2016
    Posts:
    3
    Hi Mr. Peterson,
    would you mind look at this too :

    Failed running C:\Program Files\Unity\Hub\Editor\2018.3.5f1\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="legacyunity" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="Release" --outputpath="D:\WorkSpace\Unity\Projects\Scoop\Github\Scoop\Source\Temp/StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="D:\WorkSpace\Unity\Projects\Scoop\Github\Scoop\Source\Assets\..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2018.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2018.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="D:/WorkSpace/Android/NDK/android-ndk-r16b" --map-file-parser="C:\Program Files\Unity\Hub\Editor\2018.3.5f1\Editor\Data\Tools\MapFileParser\MapFileParser.exe" --directory="D:\WorkSpace\Unity\Projects\Scoop\Github\Scoop\Source\Temp\StagingArea\assets\bin\Data\Managed" --generatedcppdir="D:\WorkSpace\Unity\Projects\Scoop\Github\Scoop\Source\Temp\StagingArea\Il2Cpp\il2cppOutput"

    stdout:
    Building libil2cpp.so with AndroidToolChain
    Output directory: D:\WorkSpace\Unity\Projects\Scoop\Github\Scoop\Source\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a
    Cache directory: D:\WorkSpace\Unity\Projects\Scoop\Github\Scoop\Source\Library\il2cpp_android_armeabi-v7a\il2cpp_cache
    ObjectFiles: 568 of which compiled: 568
    Time Compile: 30478 milliseconds Il2CppAttributes.cpp
    Time Compile: 30205 milliseconds Bulk_Assembly-CSharp_4.cpp
    Time Compile: 28991 milliseconds Bulk_Unity.TextMeshPro_1.cpp
    Time Compile: 19856 milliseconds Bulk_mscorlib_11.cpp
    Time Compile: 17932 milliseconds Il2CppInvokerTable.cpp
    Time Compile: 17288 milliseconds Il2CppMethodPointerTable.cpp
    Time Compile: 17174 milliseconds Il2CppTypeDefinitions.cpp
    Time Compile: 16951 milliseconds Il2CppMetadataUsage.cpp
    Time Compile: 16143 milliseconds Bulk_Assembly-CSharp_2.cpp
    Time Compile: 16009 milliseconds Bulk_Assembly-CSharp_1.cpp
    Total compilation time: 152672 milliseconds.
    il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: D:\WorkSpace\Android\NDK\android-ndk-r16b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\Alireza\AppData\Local\Temp\tmpF4CE.tmp" -o "D:\WorkSpace\Unity\Projects\Scoop\Github\Scoop\Source\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_51991F4ABB2157D3DB333CB454BE11C0\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "D:\WorkSpace\Android\NDK\android-ndk-r16b\platforms\android-16\arch-arm" -gcc-toolchain "D:\WorkSpace\Android\NDK\android-ndk-r16b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "D:\WorkSpace\Android\NDK\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a" -lgnustl_static -llog -Xlinker -Map="D:\WorkSpace\Unity\Projects\Scoop\Github\Scoop\Source\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_51991F4ABB2157D3DB333CB454BE11C0\libil2cpp.map" -rdynamic -fuse-ld=gold.exe

    D:\WorkSpace\Unity\Projects\Scoop\Github\Scoop\Source\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_4.cpp:41791: error: undefined reference to '_zu_initialize'
    D:\WorkSpace\Unity\Projects\Scoop\Github\Scoop\Source\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_4.cpp:41791: error: undefined reference to '_zu_initialize'
    D:\WorkSpace\Unity\Projects\Scoop\Github\Scoop\Source\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_4.cpp:41813: error: undefined reference to '_zu_startPurchaseFlow'
    clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)


    at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    at il2cpp.Program.DoRun(String[] args)
    at il2cpp.Program.Run(String[] args)
    at il2cpp.Program.Main(String[] args)
    stderr:

    Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException: D:\WorkSpace\Android\NDK\android-ndk-r16b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\Alireza\AppData\Local\Temp\tmpF4CE.tmp" -o "D:\WorkSpace\Unity\Projects\Scoop\Github\Scoop\Source\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_51991F4ABB2157D3DB333CB454BE11C0\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "D:\WorkSpace\Android\NDK\android-ndk-r16b\platforms\android-16\arch-arm" -gcc-toolchain "D:\WorkSpace\Android\NDK\android-ndk-r16b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "D:\WorkSpace\Android\NDK\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a" -lgnustl_static -llog -Xlinker -Map="D:\WorkSpace\Unity\Projects\Scoop\Github\Scoop\Source\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_51991F4ABB2157D3DB333CB454BE11C0\libil2cpp.map" -rdynamic -fuse-ld=gold.exe

    D:\WorkSpace\Unity\Projects\Scoop\Github\Scoop\Source\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_4.cpp:41791: error: undefined reference to '_zu_initialize'
    D:\WorkSpace\Unity\Projects\Scoop\Github\Scoop\Source\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_4.cpp:41791: error: undefined reference to '_zu_initialize'
    D:\WorkSpace\Unity\Projects\Scoop\Github\Scoop\Source\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_4.cpp:41813: error: undefined reference to '_zu_startPurchaseFlow'
    clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)


    at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    at il2cpp.Program.DoRun(String[] args)
    at il2cpp.Program.Run(String[] args)
    at il2cpp.Program.Main(String[] args)

    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:368)
    UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(String, String, String, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:349)
    UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:211)
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:35)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    I use Unity 2018.3.5f1 , gradle and proguard to build. i have no problem with mono
     
  18. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,035
    This error means there is an extern method defined in C# code in your project named zu_initialize. This method must have a native implementation in a static library that is compiled with the project. It looks like that native library cannot be found. Should that method be compiled for Android? If not, you can use #if statements to remove it. See https://docs.unity3d.com/Manual/PlatformDependentCompilation.html for more details.
     
  19. kartikesh211

    kartikesh211

    Joined:
    Mar 23, 2018
    Posts:
    1
    Hi I have this same error. My project is complete and working fine with mono but not IL2CPP. And as per the new google play console rule as from August 1 all app should have a 64 bit version. So please help me with this issue.
    Here is the error i am facing.

    Failed running /Applications/Unity/Hub/Editor/2019.2.0b3/Unity.app/Contents/il2cpp/build/il2cppcore/il2cppcore.dll --compile-cpp --libil2cpp-static --platform="Android" --architecture="x86" --configuration="Release" --outputpath="/Users/kartikeshgupta/Documents/Mad Driver/Temp/StagingArea/assets/bin/Data/Native/x86/libil2cpp.so" --cachedirectory="/Users/kartikeshgupta/Documents/Mad Driver/Assets/../Library/il2cpp_android_x86/il2cpp_cache" --additional-include-directories="/Applications/Unity/Hub/Editor/2019.2.0b3/PlaybackEngines/AndroidPlayer/Tools/bdwgc/include" --additional-include-directories="/Applications/Unity/Hub/Editor/2019.2.0b3/PlaybackEngines/AndroidPlayer/Tools/libil2cpp/include" --tool-chain-path="/Applications/Unity/Hub/Editor/2019.2.0b3/PlaybackEngines/AndroidPlayer/NDK" --map-file-parser="/Applications/Unity/Hub/Editor/2019.2.0b3/Unity.app/Contents/Tools/MapFileParser/MapFileParser" --generatedcppdir="/Users/kartikeshgupta/Documents/Mad Driver/Temp/StagingArea/Il2Cpp/il2cppOutput" --dotnetprofile="unityaot"

    stdout:
    Building libil2cpp.so with AndroidToolChain
    Output directory: /Users/kartikeshgupta/Documents/Mad Driver/Temp/StagingArea/assets/bin/Data/Native/x86
    Cache directory: /Users/kartikeshgupta/Documents/Mad Driver/Library/il2cpp_android_x86/il2cpp_cache
    ObjectFiles: 177 of which compiled: 0
    Total compilation time: 399 milliseconds.
    il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: /Applications/Unity/Hub/Editor/2019.2.0b3/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ @"/var/folders/0p/cjvc_b4s7hv8v23qkkn2c3kr0000gn/T/tmpyHVmgC.tmp" -o "/Users/kartikeshgupta/Documents/Mad Driver/Library/il2cpp_android_x86/il2cpp_cache/linkresult_41F47CFA985ED7F24D25CFA849603719/libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "/Applications/Unity/Hub/Editor/2019.2.0b3/PlaybackEngines/AndroidPlayer/NDK/platforms/android-16/arch-x86" -gcc-toolchain "/Applications/Unity/Hub/Editor/2019.2.0b3/PlaybackEngines/AndroidPlayer/NDK/toolchains/x86-4.9/prebuilt/darwin-x86_64" -target i686-none-linux-android -Wl,--wrap,sigaction -L "/Applications/Unity/Hub/Editor/2019.2.0b3/PlaybackEngines/AndroidPlayer/NDK/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86" -lgnustl_static -llog -rdynamic -fuse-ld=gold

    /Applications/Unity/Hub/Editor/2019.2.0b3/PlaybackEngines/AndroidPlayer/NDK/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/atomic_base.h:503: error: undefined reference to '__atomic_load_8'
    /Applications/Unity/Hub/Editor/2019.2.0b3/PlaybackEngines/AndroidPlayer/NDK/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/atomic_base.h:427: error: undefined reference to '__atomic_fetch_add_8'
    /Applications/Unity/Hub/Editor/2019.2.0b3/PlaybackEngines/AndroidPlayer/NDK/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/atomic_base.h:411: error: undefined reference to '__atomic_fetch_add_8'
    clang++: error: linker command failed with exit code 1 (use -v to see invocation)


    at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    at il2cpp.Program.DoRun(String[] args)
    at il2cpp.Program.Run(String[] args)
    at il2cpp.Program.Main(String[] args)
    stderr:

    Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException: /Applications/Unity/Hub/Editor/2019.2.0b3/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ @"/var/folders/0p/cjvc_b4s7hv8v23qkkn2c3kr0000gn/T/tmpyHVmgC.tmp" -o "/Users/kartikeshgupta/Documents/Mad Driver/Library/il2cpp_android_x86/il2cpp_cache/linkresult_41F47CFA985ED7F24D25CFA849603719/libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "/Applications/Unity/Hub/Editor/2019.2.0b3/PlaybackEngines/AndroidPlayer/NDK/platforms/android-16/arch-x86" -gcc-toolchain "/Applications/Unity/Hub/Editor/2019.2.0b3/PlaybackEngines/AndroidPlayer/NDK/toolchains/x86-4.9/prebuilt/darwin-x86_64" -target i686-none-linux-android -Wl,--wrap,sigaction -L "/Applications/Unity/Hub/Editor/2019.2.0b3/PlaybackEngines/AndroidPlayer/NDK/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86" -lgnustl_static -llog -rdynamic -fuse-ld=gold

    /Applications/Unity/Hub/Editor/2019.2.0b3/PlaybackEngines/AndroidPlayer/NDK/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/atomic_base.h:503: error: undefined reference to '__atomic_load_8'
    /Applications/Unity/Hub/Editor/2019.2.0b3/PlaybackEngines/AndroidPlayer/NDK/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/atomic_base.h:427: error: undefined reference to '__atomic_fetch_add_8'
    /Applications/Unity/Hub/Editor/2019.2.0b3/PlaybackEngines/AndroidPlayer/NDK/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/atomic_base.h:411: error: undefined reference to '__atomic_fetch_add_8'
    clang++: error: linker command failed with exit code 1 (use -v to see invocation)


    at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    at il2cpp.Program.DoRun(String[] args)
    at il2cpp.Program.Run(String[] args)
    at il2cpp.Program.Main(String[] args)
    at Program.Main(String[] args) in /Users/builduser/buildslave/unity/build/External/il2cpp/il2cpp/il2cppcore/Program.cs:line 24

    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:126)
    UnityEditorInternal.Runner:RunNetCoreProgram(String, String, String, CompilerOutputParserBase, Action`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:77)
    UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:500)
    UnityEditorInternal.IL2CPPBuilder:RunCompileAndLink() (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:370)
    UnityEditorInternal.IL2CPPUtils:RunCompileAndLink(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:77)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    ******ERROR : 2*****

    Exception: /Applications/Unity/Hub/Editor/2019.2.0b3/Unity.app/Contents/il2cpp/build/il2cppcore/il2cppcore.dll did not run properly!
    UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
    UnityEditorInternal.Runner.RunNetCoreProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:77)
    UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo, System.String workingDirectory) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:500)
    UnityEditorInternal.IL2CPPBuilder.RunCompileAndLink () (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:370)
    UnityEditorInternal.IL2CPPUtils.RunCompileAndLink (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:77)
    UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <7f7e395e378e4fff8ce354dcaa928a21>:0)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <7f7e395e378e4fff8ce354dcaa928a21>:0)
    UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <7f7e395e378e4fff8ce354dcaa928a21>:0)
    UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <7f7e395e378e4fff8ce354dcaa928a21>:0)
    UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:281)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)





    i have tried changing the ndk file location but the error came :
    NDK 20.0.5594570 detected. Unity requires NDK r16b (64-bit) (16.1.4479499).


    please please please help.. my game is in production but because of this i cant do any thing.
     
  20. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,035
    This error can occur for a few reasons. First, make sure that the x86 architecture is not selected in the Player Settings for the Android Player. You should only have armv7 and/or arm64 selected.

    If unselecting x86 does not correct this issue, please make sure the proper version of the Android NDK is installed and used by Unity. You can check the Preferences dialog in the Unity Editor to determine which NDK version should be installed and see where Unity is looking for that NDK version.
     
    IMD likes this.
  21. alevolhard

    alevolhard

    Joined:
    Oct 25, 2018
    Posts:
    3
    Can you help me please

    ERROR 1

    Failed running C:\Program Files\Unity\Editor\2019.2.1f1\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="Release" --outputpath="C:\Users\Alexis\Documents\GitHub\rz-mobile\Rz-Mobile\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="C:\Users\Alexis\Documents\GitHub\rz-mobile\Rz-Mobile\Assets\..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="C:/Program Files/Unity/Editor/2019.2.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:/Program Files/Unity/Editor/2019.2.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="C:/Program Files/Unity/Editor/2019.2.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK" --profiler-report --map-file-parser="C:/Program Files/Unity/Editor/2019.2.1f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe" --directory=C:/Users/Alexis/Documents/GitHub/rz-mobile/Rz-Mobile/Temp/StagingArea/assets/bin/Data/Managed --generatedcppdir=C:/Users/Alexis/Documents/GitHub/rz-mobile/Rz-Mobile/Temp/StagingArea/Il2Cpp/il2cppOutput

    stdout:

    Building libil2cpp.so with AndroidToolChain

    Output directory: C:\Users\Alexis\Documents\GitHub\rz-mobile\Rz-Mobile\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a

    Cache directory: C:\Users\Alexis\Documents\GitHub\rz-mobile\Rz-Mobile\Library\il2cpp_android_armeabi-v7a\il2cpp_cache

    ObjectFiles: 138 of which compiled: 0

    Total compilation time: 896 milliseconds.

    il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: C:\Program Files\Unity\Editor\2019.2.1f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\Alexis\AppData\Local\Temp\tmpBEDE.tmp" -o "C:\Users\Alexis\Documents\GitHub\rz-mobile\Rz-Mobile\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_7EC4E9870C2CCE43B6D056E9A7DF5225\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "C:\Program Files\Unity\Editor\2019.2.1f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\platforms\android-16\arch-arm" -gcc-toolchain "C:\Program Files\Unity\Editor\2019.2.1f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "C:\Program Files\Unity\Editor\2019.2.1f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a" -lgnustl_static -latomic -llog -rdynamic -fuse-ld=gold.exe

    C:\Users\Alexis\Documents\GitHub\rz-mobile\Rz-Mobile\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp.cpp:25215: error: undefined reference to 'openWindow'

    C:\Users\Alexis\Documents\GitHub\rz-mobile\Rz-Mobile\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp.cpp:27202: error: undefined reference to 'openWindow'

    clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)

    at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)

    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)

    at il2cpp.Program.DoRun(String[] args)

    at il2cpp.Program.Run(String[] args)

    at il2cpp.Program.Main(String[] args)

    stderr:

    Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException: C:\Program Files\Unity\Editor\2019.2.1f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\Alexis\AppData\Local\Temp\tmpBEDE.tmp" -o "C:\Users\Alexis\Documents\GitHub\rz-mobile\Rz-Mobile\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_7EC4E9870C2CCE43B6D056E9A7DF5225\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "C:\Program Files\Unity\Editor\2019.2.1f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\platforms\android-16\arch-arm" -gcc-toolchain "C:\Program Files\Unity\Editor\2019.2.1f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "C:\Program Files\Unity\Editor\2019.2.1f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a" -lgnustl_static -latomic -llog -rdynamic -fuse-ld=gold.exe

    C:\Users\Alexis\Documents\GitHub\rz-mobile\Rz-Mobile\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp.cpp:25215: error: undefined reference to 'openWindow'

    C:\Users\Alexis\Documents\GitHub\rz-mobile\Rz-Mobile\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp.cpp:27202: error: undefined reference to 'openWindow'

    clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)

    at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)

    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)

    at il2cpp.Program.DoRun(String[] args)

    at il2cpp.Program.Run(String[] args)

    at il2cpp.Program.Main(String[] args)

    UnityEngine.Debug:LogError(Object)

    UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:126)

    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:71)

    UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:502)

    UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(String, String, String, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:483)

    UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:334)

    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:63)

    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    ERROR 2

    Exception: C:\Program Files\Unity\Editor\2019.2.1f1\Editor\Data\il2cpp/build/il2cpp.exe did not run properly!

    UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)

    UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:71)

    UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo, System.String workingDirectory) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:502)

    UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (System.String inputDirectory, System.String outputDirectory, System.String workingDirectory, System.Boolean platformSupportsManagedDebugging) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:483)

    UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:334)

    UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:63)

    UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <7ac42593e2164800905edc596770b55e>:0)

    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <7ac42593e2164800905edc596770b55e>:0)

    UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <7ac42593e2164800905edc596770b55e>:0)

    UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <7ac42593e2164800905edc596770b55e>:0)

    UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:281)

    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
  22. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,035
    See my response earlier in this thread: https://forum.unity.com/threads/il2cpp-exe-did-not-run-properly.686434/#post-4851734

    It looks like you are seeing the same issue.
     
  23. Nano_95

    Nano_95

    Joined:
    Dec 25, 2017
    Posts:
    4
    Hi Josh,

    I was hoping you could help me out with the same issue kartikesh211 above.

    You mentioned to make sure that the Target Arichtecture x86 is not checked in the Player Settings... And to ensure that the proper NDK is installed I went to preferences and External Tools, and under NDK, I simply pressed the download button. I see the dialogies requires that I have android NDK r13b (64-bit) installed, and when i press "Download", that version begins to download. I then point it to the location where it was downloaded and unzipped:
    C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b

    However, I am still seeing the error. Any help will be greatly appreciated!

    Thank you, and happy labor day.
     
  24. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,035
    @Nano_95

    Can you send the full error message?
     
  25. Alejandro-Diaz

    Alejandro-Diaz

    Joined:
    Apr 6, 2013
    Posts:
    9
    Greetings Josh,

    I'm facing the same problem but I'm using the ndk installed from the hub, Do you mind havinng a look at my error message?

    Failed running C:\Program Files\Unity\Hub\Editor\2019.2.3f1\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARM64" --configuration="Release" --outputpath="D:\Documents\Unity Projects\philips66\Demand Frontier AR\Temp\StagingArea\assets\bin\Data\Native\arm64-v8a\libil2cpp.so" --cachedirectory="D:\Documents\Unity Projects\philips66\Demand Frontier AR\Assets\..\Library\il2cpp_android_arm64-v8a/il2cpp_cache" --additional-include-directories="C:/Program Files/Unity/Hub/Editor/2019.2.3f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:/Program Files/Unity/Hub/Editor/2019.2.3f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="C:/Program Files/Unity/Hub/Editor/2019.2.3f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK" --profiler-report --map-file-parser="C:/Program Files/Unity/Hub/Editor/2019.2.3f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe" --directory="D:/Documents/Unity Projects/philips66/Demand Frontier AR/Temp/StagingArea/assets/bin/Data/Managed" --generatedcppdir="D:/Documents/Unity Projects/philips66/Demand Frontier AR/Temp/StagingArea/Il2Cpp/il2cppOutput"

    stdout:
    Building libil2cpp.so with AndroidToolChain
    Output directory: D:\Documents\Unity Projects\philips66\Demand Frontier AR\Temp\StagingArea\assets\bin\Data\Native\arm64-v8a
    Cache directory: D:\Documents\Unity Projects\philips66\Demand Frontier AR\Library\il2cpp_android_arm64-v8a\il2cpp_cache
    ObjectFiles: 232 of which compiled: 0
    Total compilation time: 181 milliseconds.
    il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: C:\Program Files\Unity\Hub\Editor\2019.2.3f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\aldia\AppData\Local\Temp\tmp74E6.tmp" -o "D:\Documents\Unity Projects\philips66\Demand Frontier AR\Library\il2cpp_android_arm64-v8a\il2cpp_cache\linkresult_8459883FCB13706452D3842206D139E1\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "C:\Program Files\Unity\Hub\Editor\2019.2.3f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\platforms\android-21\arch-arm64" -gcc-toolchain "C:\Program Files\Unity\Hub\Editor\2019.2.3f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\aarch64-linux-android-4.9\prebuilt\windows-x86_64" -target aarch64-none-linux-android -Wl,--wrap,sigaction -L "C:\Program Files\Unity\Hub\Editor\2019.2.3f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\cxx-stl\gnu-libstdc++\4.9\libs\arm64-v8a" -lgnustl_static -latomic -llog -rdynamic -fuse-ld=bfd.exe

    D:/Documents/Unity Projects/philips66/Demand Frontier AR/Library/il2cpp_android_arm64-v8a/il2cpp_cache/A353C37AE689D24E2D531D7B0F1EB273.o: In function `UnityARVideoFormat_EnumerateVideoFormats_mA35382A4D798A5D86D66252230E9D344870125BE':
    D:\Documents\Unity Projects\philips66\Demand Frontier AR\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp3.cpp:11495: undefined reference to `EnumerateVideoFormats'
    D:\Documents\Unity Projects\philips66\Demand Frontier AR\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp3.cpp:11495: undefined reference to `EnumerateVideoFormats'
    clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)


    at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    at il2cpp.Program.DoRun(String[] args)
    at il2cpp.Program.Run(String[] args)
    at il2cpp.Program.Main(String[] args)
    stderr:

    Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException: C:\Program Files\Unity\Hub\Editor\2019.2.3f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\aldia\AppData\Local\Temp\tmp74E6.tmp" -o "D:\Documents\Unity Projects\philips66\Demand Frontier AR\Library\il2cpp_android_arm64-v8a\il2cpp_cache\linkresult_8459883FCB13706452D3842206D139E1\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "C:\Program Files\Unity\Hub\Editor\2019.2.3f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\platforms\android-21\arch-arm64" -gcc-toolchain "C:\Program Files\Unity\Hub\Editor\2019.2.3f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\aarch64-linux-android-4.9\prebuilt\windows-x86_64" -target aarch64-none-linux-android -Wl,--wrap,sigaction -L "C:\Program Files\Unity\Hub\Editor\2019.2.3f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\cxx-stl\gnu-libstdc++\4.9\libs\arm64-v8a" -lgnustl_static -latomic -llog -rdynamic -fuse-ld=bfd.exe

    D:/Documents/Unity Projects/philips66/Demand Frontier AR/Library/il2cpp_android_arm64-v8a/il2cpp_cache/A353C37AE689D24E2D531D7B0F1EB273.o: In function `UnityARVideoFormat_EnumerateVideoFormats_mA35382A4D798A5D86D66252230E9D344870125BE':
    D:\Documents\Unity Projects\philips66\Demand Frontier AR\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp3.cpp:11495: undefined reference to `EnumerateVideoFormats'
    D:\Documents\Unity Projects\philips66\Demand Frontier AR\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp3.cpp:11495: undefined reference to `EnumerateVideoFormats'
    clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)


    at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    at il2cpp.Program.DoRun(String[] args)
    at il2cpp.Program.Run(String[] args)
    at il2cpp.Program.Main(String[] args)

    UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    UnityEngine.Logger:Log(LogType, Object)
    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:\buildslave\unity\build\Editor\Mono\BuildPipeline\BuildUtils.cs:126)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:\buildslave\unity\build\Editor\Mono\BuildPipeline\BuildUtils.cs:71)
    UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) (at C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\IL2CPPUtils.cs:503)
    UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(String, String, String, Boolean) (at C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\IL2CPPUtils.cs:484)
    UnityEditorInternal.IL2CPPBuilder:Run() (at C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\IL2CPPUtils.cs:334)
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\IL2CPPUtils.cs:63)
    UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp:Execute(PostProcessorContext)
    UnityEditor.Android.PostProcessor.PostProcessRunner:RunAllTasks(PostProcessorContext)
    UnityEditor.Android.PostProcessAndroidPlayer:postProcess(BuildTarget, String, String, String, String, String, String, BuildOptions, RuntimeClassRegistry, BuildReport)
    UnityEditor.Android.AndroidBuildPostprocessor:postProcess(BuildPostProcessArgs, BuildProperties&)
    UnityEditor.PostprocessBuildPlayer:postprocess(BuildTargetGroup, BuildTarget, String, String, String, Int32, Int32, BuildOptions, RuntimeClassRegistry, BuildReport) (at C:\buildslave\unity\build\Editor\Mono\BuildPipeline\PostprocessBuildPlayer.cs:281)
    UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions, Boolean)
    UnityEditor.DefaultBuildMethods:BuildPlayer(BuildPlayerOptions) (at C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:169)
    UnityEditor.BuildPlayerWindow:CallBuildMethods(Boolean, BuildOptions) (at C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:95)
    UnityEditor.BuildPlayerWindow:GUIBuildButtons(IBuildWindowExtension, Boolean, Boolean, Boolean, BuildPlatform) (at C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindow.cs:896)
    UnityEditor.BuildPlayerWindow:ShowBuildTargetSettings() (at C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindow.cs:786)
    UnityEditor.BuildPlayerWindow:OnGUI() (at C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindow.cs:358)
    System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
    System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
    System.Reflection.MethodBase:Invoke(Object, Object[])
    UnityEditor.HostView:Invoke(String, Object) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:359)
    UnityEditor.HostView:Invoke(String) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:353)
    UnityEditor.HostView:OldOnGUI() (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:138)
    UnityEngine.UIElements.IMGUIContainer:DoOnGUI(Event, Matrix4x4, Rect, Boolean, Rect) (at C:\buildslave\unity\build\Modules\UIElements\IMGUIContainer.cs:281)
    UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent(Event, Matrix4x4, Rect) (at C:\buildslave\unity\build\Modules\UIElements\IMGUIContainer.cs:483)
    UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent(Event) (at C:\buildslave\unity\build\Modules\UIElements\IMGUIContainer.cs:466)
    UnityEngine.UIElements.IMGUIContainer:HandleEvent(EventBase) (at C:\buildslave\unity\build\Modules\UIElements\IMGUIContainer.cs:447)
    UnityEngine.UIElements.MouseCaptureDispatchingStrategy:DispatchEvent(EventBase, IPanel) (at C:\buildslave\unity\build\Modules\UIElements\Events\MouseCaptureDispatchingStrategy.cs:93)
    UnityEngine.UIElements.EventDispatcher:processEvent(EventBase, IPanel) (at C:\buildslave\unity\build\Modules\UIElements\EventDispatcher.cs:280)
    UnityEngine.UIElements.EventDispatcher:Dispatch(EventBase, IPanel, DispatchMode) (at C:\buildslave\unity\build\Modules\UIElements\EventDispatcher.cs:156)
    UnityEngine.UIElements.BaseVisualElementPanel:SendEvent(EventBase, DispatchMode) (at C:\buildslave\unity\build\Modules\UIElements\Panel.cs:190)
    UnityEngine.UIElements.UIElementsUtility:DoDispatch(BaseVisualElementPanel) (at C:\buildslave\unity\build\Modules\UIElements\UIElementsUtility.cs:255)
    UnityEngine.UIElements.UIElementsUtility:processEvent(Int32, IntPtr) (at C:\buildslave\unity\build\Modules\UIElements\UIElementsUtility.cs:78)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at C:\buildslave\unity\build\Modules\IMGUI\GUIUtility.cs:179)
    (Filename: C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs Line: 126)

    Exception: C:\Program Files\Unity\Hub\Editor\2019.2.3f1\Editor\Data\il2cpp/build/il2cpp.exe did not run properly!
    at UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) [0x0011f] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\BuildUtils.cs:128
    at UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) [0x00063] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\BuildUtils.cs:71
    at UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo, System.String workingDirectory) [0x0008b] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\IL2CPPUtils.cs:503
    at UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (System.String inputDirectory, System.String outputDirectory, System.String workingDirectory, System.Boolean platformSupportsManagedDebugging) [0x002a5] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\IL2CPPUtils.cs:484
    at UnityEditorInternal.IL2CPPBuilder.Run () [0x000ba] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\IL2CPPUtils.cs:334
    at UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) [0x0001e] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\Il2Cpp\IL2CPPUtils.cs:63
    at UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) [0x00203] in <5557b445b4634c46b2ec8376c040bd34>:0
    at UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) [0x00074] in <5557b445b4634c46b2ec8376c040bd34>:0
    at UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) [0x002c8] in <5557b445b4634c46b2ec8376c040bd34>:0
    at UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) [0x00001] in <5557b445b4634c46b2ec8376c040bd34>:0
    at UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) [0x000da] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\PostprocessBuildPlayer.cs:281
    UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions, Boolean)
    UnityEditor.DefaultBuildMethods:BuildPlayer(BuildPlayerOptions) (at C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:169)
    UnityEditor.BuildPlayerWindow:CallBuildMethods(Boolean, BuildOptions) (at C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:95)
    UnityEditor.BuildPlayerWindow:GUIBuildButtons(IBuildWindowExtension, Boolean, Boolean, Boolean, BuildPlatform) (at C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindow.cs:896)
    UnityEditor.BuildPlayerWindow:ShowBuildTargetSettings() (at C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindow.cs:786)
    UnityEditor.BuildPlayerWindow:OnGUI() (at C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindow.cs:358)
    System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
    System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
    System.Reflection.MethodBase:Invoke(Object, Object[])
    UnityEditor.HostView:Invoke(String, Object) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:359)
    UnityEditor.HostView:Invoke(String) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:353)
    UnityEditor.HostView:OldOnGUI() (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:138)
    UnityEngine.UIElements.IMGUIContainer:DoOnGUI(Event, Matrix4x4, Rect, Boolean, Rect) (at C:\buildslave\unity\build\Modules\UIElements\IMGUIContainer.cs:281)
    UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent(Event, Matrix4x4, Rect) (at C:\buildslave\unity\build\Modules\UIElements\IMGUIContainer.cs:483)
    UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent(Event) (at C:\buildslave\unity\build\Modules\UIElements\IMGUIContainer.cs:466)
    UnityEngine.UIElements.IMGUIContainer:HandleEvent(EventBase) (at C:\buildslave\unity\build\Modules\UIElements\IMGUIContainer.cs:447)
    UnityEngine.UIElements.MouseCaptureDispatchingStrategy:DispatchEvent(EventBase, IPanel) (at C:\buildslave\unity\build\Modules\UIElements\Events\MouseCaptureDispatchingStrategy.cs:93)
    UnityEngine.UIElements.EventDispatcher:processEvent(EventBase, IPanel) (at C:\buildslave\unity\build\Modules\UIElements\EventDispatcher.cs:280)
    UnityEngine.UIElements.EventDispatcher:Dispatch(EventBase, IPanel, DispatchMode) (at C:\buildslave\unity\build\Modules\UIElements\EventDispatcher.cs:156)
    UnityEngine.UIElements.BaseVisualElementPanel:SendEvent(EventBase, DispatchMode) (at C:\buildslave\unity\build\Modules\UIElements\Panel.cs:190)
    UnityEngine.UIElements.UIElementsUtility:DoDispatch(BaseVisualElementPanel) (at C:\buildslave\unity\build\Modules\UIElements\UIElementsUtility.cs:255)
    UnityEngine.UIElements.UIElementsUtility:processEvent(Int32, IntPtr) (at C:\buildslave\unity\build\Modules\UIElements\UIElementsUtility.cs:78)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at C:\buildslave\unity\build\Modules\IMGUI\GUIUtility.cs:179)

    Thanks
     
  26. Nano_95

    Nano_95

    Joined:
    Dec 25, 2017
    Posts:
    4
    @JoshPeterson

    Hey Josh, so here are some of my settings:
    upload_2019-9-3_17-56-31.png
    (i promise i have that NDK version)

    upload_2019-9-3_17-29-51.png

    and when i build I get this:

    upload_2019-9-3_17-46-40.png
    where this highlighted error is:

    Failed running C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARM64" --configuration="Release" --outputpath="C:\Users\Alec\Documents\GitHub\project_FISH\Temp/StagingArea\assets\bin\Data\Native\arm64-v8a\libil2cpp.so" --cachedirectory="C:\Users\Alec\Documents\GitHub\project_FISH\Assets\..\Library\il2cpp_android_arm64-v8a/il2cpp_cache" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="C:/Users/Alec/Downloads/android-ndk-r13b-windows-x86_64/android-ndk-r13b" --map-file-parser="C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\Tools\MapFileParser\MapFileParser.exe" --assembly="C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\assets\bin\Data\Managed\Assembly-CSharp-firstpass.dll" --assembly="C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\assets\bin\Data\Managed\Assembly-CSharp.dll" --assembly="C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.UI.dll" --assembly="C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\assets\bin\Data\Managed\UDP.dll" --assembly="C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.Advertisements.dll" --assembly="C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.Analytics.dll" --assembly="C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.dll" --assembly="C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\assets\bin\Data\Managed\mscorlib.dll" --assembly="C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\assets\bin\Data\Managed\Stores.dll" --assembly="C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.Purchasing.dll" --generatedcppdir="C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\Il2Cpp\il2cppOutput"

    stdout:
    Building libil2cpp.so with AndroidToolChain
    Output directory: C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\assets\bin\Data\Native\arm64-v8a
    Cache directory: C:\Users\Alec\Documents\GitHub\project_FISH\Library\il2cpp_android_arm64-v8a\il2cpp_cache
    il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: In file included from C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\Il2Cpp\il2cppOutput\Il2CppAttributes.cpp:13:
    In file included from C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\il2cpp\libil2cpp\codegen/il2cpp-codegen.h:54:
    In file included from C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\il2cpp\libil2cpp\codegen/il2cpp-codegen-il2cpp.h:3:
    C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\il2cpp\libil2cpp\codegen/il2cpp-codegen-common.h:5:10: fatal error: 'cassert' file not found
    #include <cassert>
    ^
    1 error generated.


    Invocation was: Executable: "C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++"
    Arguments: -DGC_NOT_DLL -DRUNTIME_IL2CPP -DLINUX -DANDROID -DPLATFORM_ANDROID -D__linux__ -D__STDC_FORMAT_MACROS -DTARGET_ARM64 -I"C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\bdwgc\include" -I"C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\libil2cpp\include" -I"C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\il2cpp\external\boehmgc\include" -I"C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\Il2Cpp\il2cppOutput" -I"." -I"C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\include" -I"C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\include\backward" -I"C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\libs\arm64-v8a\include" -c -g -DNDEBUG -funwind-tables -fno-limit-debug-info -fdata-sections -ffunction-sections -Wa,--noexecstack -fno-rtti -std=c++98 -fno-strict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -fno-strict-overflow -Os --sysroot "C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\platforms\android-21\arch-arm64" -gcc-toolchain "C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\toolchains\aarch64-linux-android-4.9\prebuilt\windows-x86_64" -target aarch64-none-linux-android -march=armv8-a -fPIE "C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\Il2Cpp\il2cppOutput\Il2CppAttributes.cpp" -o "C:/Users/Alec/Documents/GitHub/project_FISH/Library/il2cpp_android_arm64-v8a/il2cpp_cache/6301230C8400430708477C05CA51551D.o"

    at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    at il2cpp.Program.DoRun(String[] args)
    at il2cpp.Program.Run(String[] args)
    at il2cpp.Program.Main(String[] args)
    stderr:

    Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException: In file included from C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\Il2Cpp\il2cppOutput\Il2CppAttributes.cpp:13:
    In file included from C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\il2cpp\libil2cpp\codegen/il2cpp-codegen.h:54:
    In file included from C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\il2cpp\libil2cpp\codegen/il2cpp-codegen-il2cpp.h:3:
    C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\il2cpp\libil2cpp\codegen/il2cpp-codegen-common.h:5:10: fatal error: 'cassert' file not found
    #include <cassert>
    ^
    1 error generated.


    Invocation was: Executable: "C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++"
    Arguments: -DGC_NOT_DLL -DRUNTIME_IL2CPP -DLINUX -DANDROID -DPLATFORM_ANDROID -D__linux__ -D__STDC_FORMAT_MACROS -DTARGET_ARM64 -I"C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\bdwgc\include" -I"C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\libil2cpp\include" -I"C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\il2cpp\external\boehmgc\include" -I"C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\Il2Cpp\il2cppOutput" -I"." -I"C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\include" -I"C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\include\backward" -I"C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\libs\arm64-v8a\include" -c -g -DNDEBUG -funwind-tables -fno-limit-debug-info -fdata-sections -ffunction-sections -Wa,--noexecstack -fno-rtti -std=c++98 -fno-strict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -fno-strict-overflow -Os --sysroot "C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\platforms\android-21\arch-arm64" -gcc-toolchain "C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\toolchains\aarch64-linux-android-4.9\prebuilt\windows-x86_64" -target aarch64-none-linux-android -march=armv8-a -fPIE "C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\Il2Cpp\il2cppOutput\Il2CppAttributes.cpp" -o "C:/Users/Alec/Documents/GitHub/project_FISH/Library/il2cpp_android_arm64-v8a/il2cpp_cache/6301230C8400430708477C05CA51551D.o"

    at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    at il2cpp.Program.DoRun(String[] args)
    at il2cpp.Program.Run(String[] args)
    at il2cpp.Program.Main(String[] args)

    0x0000000141536728 (Unity) StackWalker::GetCurrentCallstack
    0x000000014153CC66 (Unity) StackWalker::ShowCallstack
    0x000000014140BE3B (Unity) GetStacktrace
    0x00000001408AF5A0 (Unity) DebugStringToFile
    0x00000001418DB978 (Unity) DebugLogHandler_CUSTOM_Internal_Log
    0x0000000035F613DB (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,string,UnityEngine.Object)
    0x0000000035F61234 (Mono JIT Code) [DebugLogHandler.cs:9] UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
    0x0000000035F60B35 (Mono JIT Code) [Logger.cs:47] UnityEngine.Logger:Log (UnityEngine.LogType,object)
    0x00000000441E6F03 (Mono JIT Code) [Debug.bindings.cs:117] UnityEngine.Debug:LogError (object)
    0x00000000441CCEE4 (Mono JIT Code) [BuildUtils.cs:128] UnityEditorInternal.Runner:RunProgram (UnityEditor.Utils.Program,string,string,string,UnityEditor.Scripting.Compilers.CompilerOutputParserBase)
    0x00000000441CC238 (Mono JIT Code) [BuildUtils.cs:73] UnityEditorInternal.Runner:RunManagedProgram (string,string,string,UnityEditor.Scripting.Compilers.CompilerOutputParserBase,System.Action`1<System.Diagnostics.ProcessStartInfo>)
    0x00000000441E50F1 (Mono JIT Code) [IL2CPPUtils.cs:380] UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments (System.Collections.Generic.List`1<string>,System.Action`1<System.Diagnostics.ProcessStartInfo>,string)
    0x00000000441E00BB (Mono JIT Code) [IL2CPPUtils.cs:361] UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp (System.Collections.Generic.ICollection`1<string>,string,string,bool)
    0x00000000441BA5B7 (Mono JIT Code) [IL2CPPUtils.cs:178] UnityEditorInternal.IL2CPPBuilder:Run ()
    0x00000000441B937A (Mono JIT Code) [IL2CPPUtils.cs:35] UnityEditorInternal.IL2CPPUtils:RunIl2Cpp (string,string,UnityEditorInternal.IIl2CppPlatformProvider,System.Action`1<string>,UnityEditor.RuntimeClassRegistry)
    0x00000000441B863C (Mono JIT Code) UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp:Execute (UnityEditor.Android.PostProcessor.PostProcessorContext)
    0x0000000042C1D17C (Mono JIT Code) UnityEditor.Android.PostProcessor.PostProcessRunner:RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext)
    0x0000000042CFB3C4 (Mono JIT Code) UnityEditor.Android.PostProcessAndroidPlayer:postProcess (UnityEditor.BuildTarget,string,string,string,string,string,string,UnityEditor.BuildOptions,UnityEditor.RuntimeClassRegistry,UnityEditor.Build.Reporting.BuildReport)
    0x0000000042CF9E9A (Mono JIT Code) UnityEditor.Android.AndroidBuildPostprocessor:postProcess (UnityEditor.Modules.BuildPostProcessArgs,UnityEditor.BuildProperties&)
    0x0000000042CF9582 (Mono JIT Code) [PostprocessBuildPlayer.cs:287] UnityEditor.PostprocessBuildPlayer:postprocess (UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,string,string,string,int,int,UnityEditor.BuildOptions,UnityEditor.RuntimeClassRegistry,UnityEditor.Build.Reporting.BuildReport)
    0x0000000042CF99CE (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_int_int_object_object_object_int_int_int_object_object (object,intptr,intptr,intptr)
    0x00007FF8CD07671B (mono) [mini.c:4937] mono_jit_runtime_invoke
    0x00007FF8CCFC8A71 (mono) [object.c:2623] mono_runtime_invoke
    0x0000000140C03B0A (Unity) scripting_method_invoke
    0x0000000140BFBEB0 (Unity) ScriptingInvocation::Invoke
    0x0000000140D7E7CF (Unity) CallMono
    0x0000000140D89F6D (Unity) PostprocessPlayer
    0x0000000140D81C09 (Unity) DoBuildPlayer_PostBuild
    0x0000000140D8139C (Unity) DoBuildPlayer
    0x0000000140D73B35 (Unity) BuildPlayer
    0x000000014228F52A (Unity) BuildPipeline::BuildPlayerInternalNoCheck
    0x000000014228D63C (Unity) BuildPipeline_CUSTOM_BuildPlayerInternalNoCheck
    0x0000000042BA0587 (Mono JIT Code) (wrapper managed-to-native) UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck (string[],string,string,UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,UnityEditor.BuildOptions,bool)
    0x0000000042B9FBC0 (Mono JIT Code) [BuildPlayerWindowBuildMethods.cs:170] UnityEditor.BuildPlayerWindow/DefaultBuildMethods:BuildPlayer (UnityEditor.BuildPlayerOptions)
    0x0000000042B993E4 (Mono JIT Code) [BuildPlayerWindowBuildMethods.cs:94] UnityEditor.BuildPlayerWindow:CallBuildMethods (bool,UnityEditor.BuildOptions)
    0x0000000042B5DDDB (Mono JIT Code) [BuildPlayerWindow.cs:891] UnityEditor.BuildPlayerWindow:GUIBuildButtons (UnityEditor.Modules.IBuildWindowExtension,bool,bool,bool,UnityEditor.Build.BuildPlatform)
    0x0000000042A244A7 (Mono JIT Code) [BuildPlayerWindow.cs:816] UnityEditor.BuildPlayerWindow:ShowBuildTargetSettings ()
    0x0000000042A07AB1 (Mono JIT Code) [BuildPlayerWindow.cs:414] UnityEditor.BuildPlayerWindow:OnGUI ()
    0x00000000008F7672 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
    0x00007FF8CD07671B (mono) [mini.c:4937] mono_jit_runtime_invoke
    0x00007FF8CCFC8A71 (mono) [object.c:2623] mono_runtime_invoke
    0x00007FF8CCFCEF87 (mono) [object.c:3838] mono_runtime_invoke_array
    0x00007FF8CCF8D3A2 (mono) [icall.c:2763] ves_icall_InternalInvoke
    0x00000000008C0AB7 (Mono JIT Code) (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
    0x00000000008BEC12 (Mono JIT Code) [MonoMethod.cs:222] System.Reflection.MonoMethod:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
    0x0000000035FA111F (Mono JIT Code) [MethodBase.cs:115] System.Reflection.MethodBase:Invoke (object,object[])
    0x00000000390A6595 (Mono JIT Code) [HostView.cs:295] UnityEditor.HostView:Invoke (string,object)
    0x00000000390A643A (Mono JIT Code) [HostView.cs:288] UnityEditor.HostView:Invoke (string)
    0x0000000042A06121 (Mono JIT Code) [HostView.cs:104] UnityEditor.HostView:OldOnGUI ()
    0x000000004287F30C (Mono JIT Code) [IMGUIContainer.cs:216] UnityEngine.Experimental.UIElements.IMGUIContainer:DoOnGUI (UnityEngine.Event,bool)
    0x000000004287DC52 (Mono JIT Code) [IMGUIContainer.cs:376] UnityEngine.Experimental.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event)
    0x000000003909D85F (Mono JIT Code) [IMGUIContainer.cs:355] UnityEngine.Experimental.UIElements.IMGUIContainer:HandleEvent (UnityEngine.Experimental.UIElements.EventBase)
    0x0000000039092C11 (Mono JIT Code) [EventDispatcher.cs:260] UnityEngine.Experimental.UIElements.EventDispatcher:DispatchEvent (UnityEngine.Experimental.UIElements.EventBase,UnityEngine.Experimental.UIElements.IPanel)
    0x00000000428458B8 (Mono JIT Code) [UIElementsUtility.cs:243] UnityEngine.Experimental.UIElements.UIElementsUtility:DoDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel)
    0x00000000428452EB (Mono JIT Code) [UIElementsUtility.cs:74] UnityEngine.Experimental.UIElements.UIElementsUtility:processEvent (int,intptr)
    0x0000000042844E0D (Mono JIT Code) [GUIUtility.cs:171] UnityEngine.GUIUtility:processEvent (int,intptr)
    0x0000000042844FCE (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_bool_int_intptr (object,intptr,intptr,intptr)
    0x00007FF8CD07671B (mono) [mini.c:4937] mono_jit_runtime_invoke
    0x00007FF8CCFC8A71 (mono) [object.c:2623] mono_runtime_invoke
    0x0000000140C03B0A (Unity) scripting_method_invoke
    0x0000000140BFBEB0 (Unity) ScriptingInvocation::Invoke
    0x0000000140BF6EEA (Unity) ScriptingInvocation::Invoke<bool>
    0x00000001404170D9 (Unity) IMGUIScriptingClasses::processEvent
    0x00000001413980E4 (Unity) GUIView::processRetainedMode
    0x00000001415CE832 (Unity) GUIView::OnInputEvent
    0x000000014139806C (Unity) GUIView::processInputEvent
    0x00000001415CFB8A (Unity) GUIView::processEventMessages
    0x00000001415C92BD (Unity) GUIView::GUIViewWndProc
    0x00007FF90C7E681D (USER32) CallWindowProcW
    0x00007FF90C7E6212 (USER32) DispatchMessageW
    0x00000001415E87B4 (Unity) MainMessageLoop
    0x0000000141<message truncated>


    Failed running C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARM64" --configuration="Release" --outputpath="C:\Users\Alec\Documents\GitHub\project_FISH\Temp/StagingArea\assets\bin\Data\Native\arm64-v8a\libil2cpp.so" --cachedirectory="C:\Users\Alec\Documents\GitHub\project_FISH\Assets\..\Library\il2cpp_android_arm64-v8a/il2cpp_cache" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="C:/Users/Alec/Downloads/android-ndk-r13b-windows-x86_64/android-ndk-r13b" --map-file-parser="C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\Tools\MapFileParser\MapFileParser.exe" --assembly="C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\assets\bin\Data\Managed\Assembly-CSharp-firstpass.dll" --assembly="C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\assets\bin\Data\Managed\Assembly-CSharp.dll" --assembly="C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.UI.dll" --assembly="C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\assets\bin\Data\Managed\UDP.dll" --assembly="C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.Advertisements.dll" --assembly="C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.Analytics.dll" --assembly="C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.dll" --assembly="C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\assets\bin\Data\Managed\mscorlib.dll" --assembly="C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\assets\bin\Data\Managed\Stores.dll" --assembly="C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.Purchasing.dll" --generatedcppdir="C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\Il2Cpp\il2cppOutput"

    stdout:
    Building libil2cpp.so with AndroidToolChain
    Output directory: C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\assets\bin\Data\Native\arm64-v8a
    Cache directory: C:\Users\Alec\Documents\GitHub\project_FISH\Library\il2cpp_android_arm64-v8a\il2cpp_cache
    il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: In file included from C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\Il2Cpp\il2cppOutput\Il2CppAttributes.cpp:13:
    In file included from C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\il2cpp\libil2cpp\codegen/il2cpp-codegen.h:54:
    In file included from C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\il2cpp\libil2cpp\codegen/il2cpp-codegen-il2cpp.h:3:
    C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\il2cpp\libil2cpp\codegen/il2cpp-codegen-common.h:5:10: fatal error: 'cassert' file not found
    #include <cassert>
    ^
    1 error generated.


    Invocation was: Executable: "C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++"
    Arguments: -DGC_NOT_DLL -DRUNTIME_IL2CPP -DLINUX -DANDROID -DPLATFORM_ANDROID -D__linux__ -D__STDC_FORMAT_MACROS -DTARGET_ARM64 -I"C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\bdwgc\include" -I"C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\libil2cpp\include" -I"C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\il2cpp\external\boehmgc\include" -I"C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\Il2Cpp\il2cppOutput" -I"." -I"C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\include" -I"C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\include\backward" -I"C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\libs\arm64-v8a\include" -c -g -DNDEBUG -funwind-tables -fno-limit-debug-info -fdata-sections -ffunction-sections -Wa,--noexecstack -fno-rtti -std=c++98 -fno-strict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -fno-strict-overflow -Os --sysroot "C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\platforms\android-21\arch-arm64" -gcc-toolchain "C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\toolchains\aarch64-linux-android-4.9\prebuilt\windows-x86_64" -target aarch64-none-linux-android -march=armv8-a -fPIE "C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\Il2Cpp\il2cppOutput\Il2CppAttributes.cpp" -o "C:/Users/Alec/Documents/GitHub/project_FISH/Library/il2cpp_android_arm64-v8a/il2cpp_cache/6301230C8400430708477C05CA51551D.o"

    at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    at il2cpp.Program.DoRun(String[] args)
    at il2cpp.Program.Run(String[] args)
    at il2cpp.Program.Main(String[] args)
    stderr:

    Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException: In file included from C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\Il2Cpp\il2cppOutput\Il2CppAttributes.cpp:13:
    In file included from C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\il2cpp\libil2cpp\codegen/il2cpp-codegen.h:54:
    In file included from C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\il2cpp\libil2cpp\codegen/il2cpp-codegen-il2cpp.h:3:
    C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\il2cpp\libil2cpp\codegen/il2cpp-codegen-common.h:5:10: fatal error: 'cassert' file not found
    #include <cassert>
    ^
    1 error generated.


    Invocation was: Executable: "C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++"
    Arguments: -DGC_NOT_DLL -DRUNTIME_IL2CPP -DLINUX -DANDROID -DPLATFORM_ANDROID -D__linux__ -D__STDC_FORMAT_MACROS -DTARGET_ARM64 -I"C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\bdwgc\include" -I"C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\libil2cpp\include" -I"C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\il2cpp\external\boehmgc\include" -I"C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\Il2Cpp\il2cppOutput" -I"." -I"C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\include" -I"C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\include\backward" -I"C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\libs\arm64-v8a\include" -c -g -DNDEBUG -funwind-tables -fno-limit-debug-info -fdata-sections -ffunction-sections -Wa,--noexecstack -fno-rtti -std=c++98 -fno-strict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -fno-strict-overflow -Os --sysroot "C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\platforms\android-21\arch-arm64" -gcc-toolchain "C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\toolchains\aarch64-linux-android-4.9\prebuilt\windows-x86_64" -target aarch64-none-linux-android -march=armv8-a -fPIE "C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\Il2Cpp\il2cppOutput\Il2CppAttributes.cpp" -o "C:/Users/Alec/Documents/GitHub/project_FISH/Library/il2cpp_android_arm64-v8a/il2cpp_cache/6301230C8400430708477C05CA51551D.o"

    at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    at il2cpp.Program.DoRun(String[] args)
    at il2cpp.Program.Run(String[] args)
    at il2cpp.Program.Main(String[] args)

    0x0000000141536728 (Unity) StackWalker::GetCurrentCallstack
    0x000000014153CC66 (Unity) StackWalker::ShowCallstack
    0x000000014140BE3B (Unity) GetStacktrace
    0x00000001408AF5A0 (Unity) DebugStringToFile
    0x00000001418DB978 (Unity) DebugLogHandler_CUSTOM_Internal_Log
    0x0000000035F613DB (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,string,UnityEngine.Object)
    0x0000000035F61234 (Mono JIT Code) [DebugLogHandler.cs:9] UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
    0x0000000035F60B35 (Mono JIT Code) [Logger.cs:47] UnityEngine.Logger:Log (UnityEngine.LogType,object)
    0x00000000441E6F03 (Mono JIT Code) [Debug.bindings.cs:117] UnityEngine.Debug:LogError (object)
    0x00000000441CCEE4 (Mono JIT Code) [BuildUtils.cs:128] UnityEditorInternal.Runner:RunProgram (UnityEditor.Utils.Program,string,string,string,UnityEditor.Scripting.Compilers.CompilerOutputParserBase)
    0x00000000441CC238 (Mono JIT Code) [BuildUtils.cs:73] UnityEditorInternal.Runner:RunManagedProgram (string,string,string,UnityEditor.Scripting.Compilers.CompilerOutputParserBase,System.Action`1<System.Diagnostics.ProcessStartInfo>)
    0x00000000441E50F1 (Mono JIT Code) [IL2CPPUtils.cs:380] UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments (System.Collections.Generic.List`1<string>,System.Action`1<System.Diagnostics.ProcessStartInfo>,string)
    0x00000000441E00BB (Mono JIT Code) [IL2CPPUtils.cs:361] UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp (System.Collections.Generic.ICollection`1<string>,string,string,bool)
    0x00000000441BA5B7 (Mono JIT Code) [IL2CPPUtils.cs:178] UnityEditorInternal.IL2CPPBuilder:Run ()
    0x00000000441B937A (Mono JIT Code) [IL2CPPUtils.cs:35] UnityEditorInternal.IL2CPPUtils:RunIl2Cpp (string,string,UnityEditorInternal.IIl2CppPlatformProvider,System.Action`1<string>,UnityEditor.RuntimeClassRegistry)
    0x00000000441B863C (Mono JIT Code) UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp:Execute (UnityEditor.Android.PostProcessor.PostProcessorContext)
    0x0000000042C1D17C (Mono JIT Code) UnityEditor.Android.PostProcessor.PostProcessRunner:RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext)
    0x0000000042CFB3C4 (Mono JIT Code) UnityEditor.Android.PostProcessAndroidPlayer:postProcess (UnityEditor.BuildTarget,string,string,string,string,string,string,UnityEditor.BuildOptions,UnityEditor.RuntimeClassRegistry,UnityEditor.Build.Reporting.BuildReport)
    0x0000000042CF9E9A (Mono JIT Code) UnityEditor.Android.AndroidBuildPostprocessor:postProcess (UnityEditor.Modules.BuildPostProcessArgs,UnityEditor.BuildProperties&)
    0x0000000042CF9582 (Mono JIT Code) [PostprocessBuildPlayer.cs:287] UnityEditor.PostprocessBuildPlayer:postprocess (UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,string,string,string,int,int,UnityEditor.BuildOptions,UnityEditor.RuntimeClassRegistry,UnityEditor.Build.Reporting.BuildReport)
    0x0000000042CF99CE (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_int_int_object_object_object_int_int_int_object_object (object,intptr,intptr,intptr)
    0x00007FF8CD07671B (mono) [mini.c:4937] mono_jit_runtime_invoke
    0x00007FF8CCFC8A71 (mono) [object.c:2623] mono_runtime_invoke
    0x0000000140C03B0A (Unity) scripting_method_invoke
    0x0000000140BFBEB0 (Unity) ScriptingInvocation::Invoke
    0x0000000140D7E7CF (Unity) CallMono
    0x0000000140D89F6D (Unity) PostprocessPlayer
    0x0000000140D81C09 (Unity) DoBuildPlayer_PostBuild
    0x0000000140D8139C (Unity) DoBuildPlayer
    0x0000000140D73B35 (Unity) BuildPlayer
    0x000000014228F52A (Unity) BuildPipeline::BuildPlayerInternalNoCheck
    0x000000014228D63C (Unity) BuildPipeline_CUSTOM_BuildPlayerInternalNoCheck
    0x0000000042BA0587 (Mono JIT Code) (wrapper managed-to-native) UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck (string[],string,string,UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,UnityEditor.BuildOptions,bool)
    0x0000000042B9FBC0 (Mono JIT Code) [BuildPlayerWindowBuildMethods.cs:170] UnityEditor.BuildPlayerWindow/DefaultBuildMethods:BuildPlayer (UnityEditor.BuildPlayerOptions)
    0x0000000042B993E4 (Mono JIT Code) [BuildPlayerWindowBuildMethods.cs:94] UnityEditor.BuildPlayerWindow:CallBuildMethods (bool,UnityEditor.BuildOptions)
    0x0000000042B5DDDB (Mono JIT Code) [BuildPlayerWindow.cs:891] UnityEditor.BuildPlayerWindow:GUIBuildButtons (UnityEditor.Modules.IBuildWindowExtension,bool,bool,bool,UnityEditor.Build.BuildPlatform)
    0x0000000042A244A7 (Mono JIT Code) [BuildPlayerWindow.cs:816] UnityEditor.BuildPlayerWindow:ShowBuildTargetSettings ()
    0x0000000042A07AB1 (Mono JIT Code) [BuildPlayerWindow.cs:414] UnityEditor.BuildPlayerWindow:OnGUI ()
    0x00000000008F7672 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
    0x00007FF8CD07671B (mono) [mini.c:4937] mono_jit_runtime_invoke
    0x00007FF8CCFC8A71 (mono) [object.c:2623] mono_runtime_invoke
    0x00007FF8CCFCEF87 (mono) [object.c:3838] mono_runtime_invoke_array
    0x00007FF8CCF8D3A2 (mono) [icall.c:2763] ves_icall_InternalInvoke
    0x00000000008C0AB7 (Mono JIT Code) (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
    0x00000000008BEC12 (Mono JIT Code) [MonoMethod.cs:222] System.Reflection.MonoMethod:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
    0x0000000035FA111F (Mono JIT Code) [MethodBase.cs:115] System.Reflection.MethodBase:Invoke (object,object[])
    0x00000000390A6595 (Mono JIT Code) [HostView.cs:295] UnityEditor.HostView:Invoke (string,object)
    0x00000000390A643A (Mono JIT Code) [HostView.cs:288] UnityEditor.HostView:Invoke (string)
    0x0000000042A06121 (Mono JIT Code) [HostView.cs:104] UnityEditor.HostView:OldOnGUI ()
    0x000000004287F30C (Mono JIT Code) [IMGUIContainer.cs:216] UnityEngine.Experimental.UIElements.IMGUIContainer:DoOnGUI (UnityEngine.Event,bool)
    0x000000004287DC52 (Mono JIT Code) [IMGUIContainer.cs:376] UnityEngine.Experimental.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event)
    0x000000003909D85F (Mono JIT Code) [IMGUIContainer.cs:355] UnityEngine.Experimental.UIElements.IMGUIContainer:HandleEvent (UnityEngine.Experimental.UIElements.EventBase)
    0x0000000039092C11 (Mono JIT Code) [EventDispatcher.cs:260] UnityEngine.Experimental.UIElements.EventDispatcher:DispatchEvent (UnityEngine.Experimental.UIElements.EventBase,UnityEngine.Experimental.UIElements.IPanel)
    0x00000000428458B8 (Mono JIT Code) [UIElementsUtility.cs:243] UnityEngine.Experimental.UIElements.UIElementsUtility:DoDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel)
    0x00000000428452EB (Mono JIT Code) [UIElementsUtility.cs:74] UnityEngine.Experimental.UIElements.UIElementsUtility:processEvent (int,intptr)
    0x0000000042844E0D (Mono JIT Code) [GUIUtility.cs:171] UnityEngine.GUIUtility:processEvent (int,intptr)
    0x0000000042844FCE (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_bool_int_intptr (object,intptr,intptr,intptr)
    0x00007FF8CD07671B (mono) [mini.c:4937] mono_jit_runtime_invoke
    0x00007FF8CCFC8A71 (mono) [object.c:2623] mono_runtime_invoke
    0x0000000140C03B0A (Unity) scripting_method_invoke
    0x0000000140BFBEB0 (Unity) ScriptingInvocation::Invoke
    0x0000000140BF6EEA (Unity) ScriptingInvocation::Invoke<bool>
    0x00000001404170D9 (Unity) IMGUIScriptingClasses::processEvent
    0x00000001413980E4 (Unity) GUIView::processRetainedMode
    0x00000001415CE832 (Unity) GUIView::OnInputEvent
    0x000000014139806C (Unity) GUIView::processInputEvent
    0x00000001415CFB8A (Unity) GUIView::processEventMessages
    0x00000001415C92BD (Unity) GUIView::GUIViewWndProc
    0x00007FF90C7E681D (USER32) CallWindowProcW
    0x00007FF90C7E6212 (USER32) DispatchMessageW
    0x00000001415E87B4 (Unity) MainMessageLoop
    0x0000000141<message truncated>


    I'm not sure why the build ends as successful, since I got these errors, and my .apk was not created.
    Either way I really appreciate your help, man!

    Regards,

    Alec
     

    Attached Files:

  27. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,035
    @Alejandro-Diaz

    It looks like the problem is related to the EnumerateVideoFormats method. This is an extern method in C#, meaning that it must have a native implementation. If it should have an implementation in a native library for Android, please make sure that library is included as a native plugin in the build.

    If it should not be included for Android, please use #if statements in C# to remove it from the build. See https://docs.unity3d.com/Manual/PlatformDependentCompilation.html for details.
     
  28. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,035
    @Nano_95

    Yes, the build definitely failed. I'm not sure why Unity says that it succeeded.

    I'm not sure why the cassert.h header file is not found. Can you search for that file in the C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\ directory? It should exist somewhere there.

    It might also be useful to try the C++ compiler by itself in a terminal window. Make sure you have the Unity editor open and cause the error to occur. Then leave Unity open (so it won't delete any temporary files), then run the clang++ command from the editor error message in a command prompt.

    "C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++" -DGC_NOT_DLL -DRUNTIME_IL2CPP -DLINUX -DANDROID -DPLATFORM_ANDROID -D__linux__ -D__STDC_FORMAT_MACROS -DTARGET_ARM64 -I"C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\bdwgc\include" -I"C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\libil2cpp\include" -I"C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Hub\Editor\2018.2.7f1\Editor\Data\il2cpp\external\boehmgc\include" -I"C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\Il2Cpp\il2cppOutput" -I"." -I"C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\include" -I"C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\include\backward" -I"C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\libs\arm64-v8a\include" -c -g -DNDEBUG -funwind-tables -fno-limit-debug-info -fdata-sections -ffunction-sections -Wa,--noexecstack -fno-rtti -std=c++98 -fno-strict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -fno-strict-overflow -Os --sysroot "C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\platforms\android-21\arch-arm64" -gcc-toolchain "C:\Users\Alec\Downloads\android-ndk-r13b-windows-x86_64\android-ndk-r13b\toolchains\aarch64-linux-android-4.9\prebuilt\windows-x86_64" -target aarch64-none-linux-android -march=armv8-a -fPIE "C:\Users\Alec\Documents\GitHub\project_FISH\Temp\StagingArea\Il2Cpp\il2cppOutput\Il2CppAttributes.cpp" -o "C:/Users/Alec/Documents/GitHub/project_FISH/Library/il2cpp_android_arm64-v8a/il2cpp_cache/6301230C8400430708477C05CA51551D.o"

    Does that give the same error message? If so, you can add the -H option to the clang++ command line. That will show information of where clang is looking for include files, and that might help track down the cause of the issue.
     
  29. Alejandro-Diaz

    Alejandro-Diaz

    Joined:
    Apr 6, 2013
    Posts:
    9
    Thanks Josh, adding #if UNITY_ANDROID worked!
     
    JoshPeterson likes this.
  30. Nano_95

    Nano_95

    Joined:
    Dec 25, 2017
    Posts:
    4

    @JoshPeterson
    Hey Josh, so I went ahead and looked for that file, and did not find it! So i re-downloaded the NDK... r13b, and the cassert.h file was in there!

    Once I built that, It worked! Thanks so much!
     
    JoshPeterson likes this.
  31. unity_8UocnlLkPy_Xsg

    unity_8UocnlLkPy_Xsg

    Joined:
    Apr 2, 2019
    Posts:
    3
    While building a Google Play Bundle App, I receive the same kind of errors as mentioned in this thread.

    Failed running C:\Program Files\Unity\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARM64" --configuration="Release" -

    With the following error logs:

    Failed running C:\Program Files\Unity\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARM64" --configuration="Release" --outputpath="C:\Users\Sander van Rijsoort\Documents\MafiaGo\MafiaGo_cloud\MafiaGoV1_new\MafiaGo5Sept\MafiaGoV1\Temp\StagingArea\assets\bin\Data\Native\arm64-v8a\libil2cpp.so" --cachedirectory="C:\Users\Sander van Rijsoort\Documents\MafiaGo\MafiaGo_cloud\MafiaGoV1_new\MafiaGo5Sept\MafiaGoV1\Assets\..\Library\il2cpp_android_arm64-v8a/il2cpp_cache" --additional-include-directories="C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="C:/Users/Sander van Rijsoort/Documents/android-ndk-r16b" --map-file-parser="C:\Program Files\Unity\Editor\Data\Tools\MapFileParser\MapFileParser.exe" --directory="C:\Users\Sander van Rijsoort\Documents\MafiaGo\MafiaGo_cloud\MafiaGoV1_new\MafiaGo5Sept\MafiaGoV1\Temp\StagingArea\assets\bin\Data\Managed" --generatedcppdir="C:\Users\Sander van Rijsoort\Documents\MafiaGo\MafiaGo_cloud\MafiaGoV1_new\MafiaGo5Sept\MafiaGoV1\Temp\StagingArea\Il2Cpp\il2cppOutput"

    stdout:
    Building libil2cpp.so with AndroidToolChain
    Output directory: C:\Users\Sander van Rijsoort\Documents\MafiaGo\MafiaGo_cloud\MafiaGoV1_new\MafiaGo5Sept\MafiaGoV1\Temp\StagingArea\assets\bin\Data\Native\arm64-v8a
    Cache directory: C:\Users\Sander van Rijsoort\Documents\MafiaGo\MafiaGo_cloud\MafiaGoV1_new\MafiaGo5Sept\MafiaGoV1\Library\il2cpp_android_arm64-v8a\il2cpp_cache
    il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: fatal error: error in backend: IO failure on output stream.


    Invocation was: Executable: "C:\Users\Sander van Rijsoort\Documents\android-ndk-r16b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++"
    Arguments: -DNET_4_0 -DUNITY_AOT -DGC_NOT_DLL -DRUNTIME_IL2CPP -DLINUX -DANDROID -DPLATFORM_ANDROID -D__linux__ -D__STDC_FORMAT_MACROS -DTARGET_ARM64 -I"C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\bdwgc\include" -I"C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\libil2cpp\include" -I"C:\Program Files\Unity\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Editor\Data\il2cpp\external\boehmgc\include" -I"C:\Users\Sander van Rijsoort\Documents\MafiaGo\MafiaGo_cloud\MafiaGoV1_new\MafiaGo5Sept\MafiaGoV1\Temp\StagingArea\Il2Cpp\il2cppOutput" -I"." -I"C:\Users\Sander van Rijsoort\Documents\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\include" -I"C:\Users\Sander van Rijsoort\Documents\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\include\backward" -I"C:\Users\Sander van Rijsoort\Documents\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\libs\arm64-v8a\include" -c -g -DNDEBUG -funwind-tables -fno-limit-debug-info -fdata-sections -ffunction-sections -Wa,--noexecstack -fno-rtti -std=c++98 -fno-strict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -fno-strict-overflow -fPIC -Os --sysroot "C:\Users\Sander van Rijsoort\Documents\android-ndk-r16b\sysroot" -gcc-toolchain "C:\Users\Sander van Rijsoort\Documents\android-ndk-r16b\toolchains\aarch64-linux-android-4.9\prebuilt\windows-x86_64" -target aarch64-none-linux-android -isystem "C:\Users\Sander van Rijsoort\Documents\android-ndk-r16b\sysroot\usr\include\aarch64-linux-android" -D__ANDROID_API__=21 -march=armv8-a -Wno-unused-value "C:\Users\Sander van Rijsoort\Documents\MafiaGo\MafiaGo_cloud\MafiaGoV1_new\MafiaGo5Sept\MafiaGoV1\Temp\StagingArea\Il2Cpp\il2cppOutput\Bulk_System.Xml_6.cpp" -o "C:/Users/Sander van Rijsoort/Documents/MafiaGo/MafiaGo_cloud/MafiaGoV1_new/MafiaGo5Sept/MafiaGoV1/Library/il2cpp_android_arm64-v8a/il2cpp_cache/F650DB77F3169E652FAE30A332E9EB49.o"

    bij Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
    bij Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    bij il2cpp.Program.DoRun(String[] args)
    bij il2cpp.Program.Run(String[] args)
    bij il2cpp.Program.Main(String[] args)
    stderr:

    Onverwerkte uitzondering: Unity.IL2CPP.Building.BuilderFailedException: fatal error: error in backend: IO failure on output stream.


    Invocation was: Executable: "C:\Users\Sander van Rijsoort\Documents\android-ndk-r16b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++"
    Arguments: -DNET_4_0 -DUNITY_AOT -DGC_NOT_DLL -DRUNTIME_IL2CPP -DLINUX -DANDROID -DPLATFORM_ANDROID -D__linux__ -D__STDC_FORMAT_MACROS -DTARGET_ARM64 -I"C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\bdwgc\include" -I"C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\libil2cpp\include" -I"C:\Program Files\Unity\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Editor\Data\il2cpp\external\boehmgc\include" -I"C:\Users\Sander van Rijsoort\Documents\MafiaGo\MafiaGo_cloud\MafiaGoV1_new\MafiaGo5Sept\MafiaGoV1\Temp\StagingArea\Il2Cpp\il2cppOutput" -I"." -I"C:\Users\Sander van Rijsoort\Documents\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\include" -I"C:\Users\Sander van Rijsoort\Documents\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\include\backward" -I"C:\Users\Sander van Rijsoort\Documents\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\libs\arm64-v8a\include" -c -g -DNDEBUG -funwind-tables -fno-limit-debug-info -fdata-sections -ffunction-sections -Wa,--noexecstack -fno-rtti -std=c++98 -fno-strict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -fno-strict-overflow -fPIC -Os --sysroot "C:\Users\Sander van Rijsoort\Documents\android-ndk-r16b\sysroot" -gcc-toolchain "C:\Users\Sander van Rijsoort\Documents\android-ndk-r16b\toolchains\aarch64-linux-android-4.9\prebuilt\windows-x86_64" -target aarch64-none-linux-android -isystem "C:\Users\Sander van Rijsoort\Documents\android-ndk-r16b\sysroot\usr\include\aarch64-linux-android" -D__ANDROID_API__=21 -march=armv8-a -Wno-unused-value "C:\Users\Sander van Rijsoort\Documents\MafiaGo\MafiaGo_cloud\MafiaGoV1_new\MafiaGo5Sept\MafiaGoV1\Temp\StagingArea\Il2Cpp\il2cppOutput\Bulk_System.Xml_6.cpp" -o "C:/Users/Sander van Rijsoort/Documents/MafiaGo/MafiaGo_cloud/MafiaGoV1_new/MafiaGo5Sept/MafiaGoV1/Library/il2cpp_android_arm64-v8a/il2cpp_cache/F650DB77F3169E652FAE30A332E9EB49.o"

    bij Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
    bij Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    bij il2cpp.Program.DoRun(String[] args)
    bij il2cpp.Program.Run(String[] args)
    bij il2cpp.Program.Main(String[] args)

    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:368)
    UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(String, String, String, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:349)
    UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:211)
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:35)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)


    Could someone help me out with this problem and give me a better understanding of the error logs?

    Kind Regards, Sander!
     
  32. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,035
    The error here seems to be:

    fatal error: error in backend: IO failure on output stream.

    This looks like an error from clang++ in the Android NDK. I've not seen it before, and I'm unsure what it means. It look like thie happens during compilation of some generated C++ code for ARM64. Does the same thing happen with ARMv7? Also, can you submit this project with a bug report to Unity? We might be able to isolate the cause of the problem and provide a bug report to the Android Team at Google.
     
  33. qosja

    qosja

    Joined:
    Oct 10, 2013
    Posts:
    14
    @JoshPeterson I am having nearly the same issue, the things mentioned above but still i have an error when i try and build my project in android . Error is as below:


    Code (CSharp):
    1. Win32Exception: ApplicationName='C:\Program Files\Unity\Hub\Editor\2018.4.3\Editor\Data\il2cpp/build/il2cpp.exe', CommandLine='--convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="legacyunity" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="Release" --outputpath="C:\Users\arman\Desktop\Bepart\Temp/StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="C:\Users\arman\Desktop\Bepart\Assets\..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2018.4.3\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2018.4.3\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="C:/android-ndk-r16b" --map-file-parser="C:\Program Files\Unity\Hub\Editor\2018.4.3\Editor\Data\Tools\MapFileParser\MapFileParser.exe" --directory="C:\Users\arman\Desktop\Bepart\Temp\StagingArea\assets\bin\Data\Managed" --generatedcppdir="C:\Users\arman\Desktop\Bepart\Temp\StagingArea\Il2Cpp\il2cppOutput" ', CurrentDirectory='C:\Users\arman\Desktop\Bepart\Temp\StagingArea\assets\bin\Data\Managed'
    2. System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process)
    3. System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process)
    4. System.Diagnostics.Process.Start ()
    5. (wrapper remoting-invoke-with-check) System.Diagnostics.Process:Start ()
    6. UnityEditor.Utils.Program.Start (System.EventHandler exitCallback) (at C:/buildslave/unity/build/Editor/Mono/Utils/Program.cs:44)
    7. UnityEditor.Utils.Program.Start () (at C:/buildslave/unity/build/Editor/Mono/Utils/Program.cs:28)
    8. UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:106)
    9. UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1 setupStartInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    10. UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1 arguments, System.Action`1 setupStartInfo, System.String workingDirectory) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:368)
    11. UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (System.String inputDirectory, System.String outputDirectory, System.String workingDirectory, Boolean platformSupportsManagedDebugging) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:349)
    12. UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:211)
    13. UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:35)
    14. UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    15. UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    16. UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report)
    17. UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties)
    18. UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:286)
    19. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    20.  
     
  34. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,035
    This likely happens because il2cpp.exe itself cannot run. The il2cpp.exe utility is a managed executable that runs via .NET Framework. Please check to make sure you have .NET Framework 4.7.1 or later installed on your computer.
     
  35. qosja

    qosja

    Joined:
    Oct 10, 2013
    Posts:
    14
    @JoshPeterson ".NET Framework 4.7.2 or a later update is already installed on this computer." and the error is still there
     
  36. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,035
    Can you run "C:\Program Files\Unity\Hub\Editor\2018.4.3\Editor\Data\il2cpp\build\il2cpp.exe" manually from the command prompt?
     
  37. qosja

    qosja

    Joined:
    Oct 10, 2013
    Posts:
    14
    @
    @JoshPeterson , yes a window opens and closes imidiately
     
  38. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,035
    Sorry, can you try running it with the --help argument?

    "C:\Program Files\Unity\Hub\Editor\2018.4.3\Editor\Data\il2cpp\build\il2cpp.exe" --help

    Make sure you open a command prompt, don't just run il2cpp.exe from the directory in Windows Explorer. Then you should see some output.
     
  39. qosja

    qosja

    Joined:
    Oct 10, 2013
    Posts:
    14
    @JoshPeterson i open command prompt, added --help and its still the same.. another window opens and closes imidiately
     
  40. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,035
    I'm not sure about the cause of this problem then. Can you submit a bug report from the Unity editor? https://unity3d.com/unity/qa/bug-reporting
     
  41. qosja

    qosja

    Joined:
    Oct 10, 2013
    Posts:
    14
    @
    @JoshPeterson sorry sorry sorry... i reopened comand prompt as administrator and now it opens with --help and it gives a list of options
     
  42. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,035
    Maybe try to run Unity as administrator then. There could be some permissions issue.
     
  43. qosja

    qosja

    Joined:
    Oct 10, 2013
    Posts:
    14
    @JoshPeterson, i run Unity as administrator. still the same error
     
  44. qosja

    qosja

    Joined:
    Oct 10, 2013
    Posts:
    14
    @JoshPeterson now i have another one.. 2 errors. the one i mentioned before and this one..


    Code (CSharp):
    1. Exception: C:\Program Files\Unity\Hub\Editor\2018.4.3\Editor\Data\il2cpp/build/il2cpp.exe did not run properly!
    2. UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:130)
    3. UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1 setupStartInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    4. UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1 arguments, System.Action`1 setupStartInfo, System.String workingDirectory) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:368)
    5. UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (System.String inputDirectory, System.String outputDirectory, System.String workingDirectory, Boolean platformSupportsManagedDebugging) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:349)
    6. UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:211)
    7. UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:35)
    8.  
     
  45. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,035
    There should be another error message after or before this one. Can you send that? This looks like a different error message than the one you had before.
     
  46. qosja

    qosja

    Joined:
    Oct 10, 2013
    Posts:
    14
    @JoshPeterson yes here are the two errors :

    Code (CSharp):
    1. Failed running C:\Program Files\Unity\Hub\Editor\2018.4.3\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="legacyunity" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="Release" --outputpath="C:\Users\arman\Desktop\Bepart\Temp/StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="C:\Users\arman\Desktop\Bepart\Assets\..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2018.4.3\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2018.4.3\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="C:/Users/arman/Desktop/android-ndk-r16b" --map-file-parser="C:\Program Files\Unity\Hub\Editor\2018.4.3\Editor\Data\Tools\MapFileParser\MapFileParser.exe" --directory="C:\Users\arman\Desktop\Bepart\Temp\StagingArea\assets\bin\Data\Managed" --generatedcppdir="C:\Users\arman\Desktop\Bepart\Temp\StagingArea\Il2Cpp\il2cppOutput"
    2.  
    3. stdout:
    4. Building libil2cpp.so with AndroidToolChain
    5.     Output directory: C:\Users\arman\Desktop\Bepart\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a
    6.     Cache directory: C:\Users\arman\Desktop\Bepart\Library\il2cpp_android_armeabi-v7a\il2cpp_cache
    7. ObjectFiles: 589 of which compiled: 0
    8. Total compilation time: 18660 milliseconds.
    9. il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: C:\Users\arman\Desktop\android-ndk-r16b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\arman\AppData\Local\Temp\tmpC7F6.tmp" -o "C:\Users\arman\Desktop\Bepart\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_CFE31076600E2593C7DAED5AA26D28CD\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "C:\Users\arman\Desktop\android-ndk-r16b\platforms\android-16\arch-arm" -gcc-toolchain "C:\Users\arman\Desktop\android-ndk-r16b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "C:\Users\arman\Desktop\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a" -lgnustl_static -llog -rdynamic -fuse-ld=gold.exe
    10.  
    11. C:\Users\arman\Desktop\Bepart\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_1.cpp:41260: error: undefined reference to '_Share'
    12. C:\Users\arman\Desktop\Bepart\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_2.cpp:35596: error: undefined reference to 'openSettingsIOS'
    13. clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
    14.  
    15.  
    16.   at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
    17.   at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    18.   at il2cpp.Program.DoRun(String[] args)
    19.   at il2cpp.Program.Run(String[] args)
    20.   at il2cpp.Program.Main(String[] args)
    21. stderr:
    22.  
    23. Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException: C:\Users\arman\Desktop\android-ndk-r16b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\arman\AppData\Local\Temp\tmpC7F6.tmp" -o "C:\Users\arman\Desktop\Bepart\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_CFE31076600E2593C7DAED5AA26D28CD\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "C:\Users\arman\Desktop\android-ndk-r16b\platforms\android-16\arch-arm" -gcc-toolchain "C:\Users\arman\Desktop\android-ndk-r16b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "C:\Users\arman\Desktop\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a" -lgnustl_static -llog -rdynamic -fuse-ld=gold.exe
    24.  
    25. C:\Users\arman\Desktop\Bepart\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_1.cpp:41260: error: undefined reference to '_Share'
    26. C:\Users\arman\Desktop\Bepart\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_2.cpp:35596: error: undefined reference to 'openSettingsIOS'
    27. clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
    28.  
    29.  
    30.   at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
    31.   at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    32.   at il2cpp.Program.DoRun(String[] args)
    33.   at il2cpp.Program.Run(String[] args)
    34.   at il2cpp.Program.Main(String[] args)
    35.  
    36. UnityEngine.Debug:LogError(Object)
    37. UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
    38. UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    39. UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:368)
    40. UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(String, String, String, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:349)
    41. UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:211)
    42. UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:35)
    43. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    44.  


    Code (CSharp):
    1. Exception: C:\Program Files\Unity\Hub\Editor\2018.4.3\Editor\Data\il2cpp/build/il2cpp.exe did not run properly!
    2. UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:130)
    3. UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1 setupStartInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    4. UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1 arguments, System.Action`1 setupStartInfo, System.String workingDirectory) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:368)
    5. UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (System.String inputDirectory, System.String outputDirectory, System.String workingDirectory, Boolean platformSupportsManagedDebugging) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:349)
    6. UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:211)
    7. UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:35)
    8. UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    9. UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    10. UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report)
    11. UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties)
    12. UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:286)
    13. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    14.  
     
  47. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,035
    Ok, so now the problem is the method _Share (and the other one mentioned in the error). These are extern methods in C# code. They must have a corresponding native library implementation. If they have an implementation for Android, please make sure that native library is in the Unity build. If not, use #if statements to remove them from the C# code compiled on Android. See https://docs.unity3d.com/Manual/PlatformDependentCompilation.html for details.
     
  48. qosja

    qosja

    Joined:
    Oct 10, 2013
    Posts:
    14
    @JoshPeterson i really dont understand this. Because my project was good. i made an update and these errors kept appearing. i havent changed a thing in my scripts, and i really dont know what to comment
     
  49. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,035
    I don't believe that this code could have ever worked with IL2CPP. It would have compiled properly with the Mono scripting backend, as Mono allowed these unresolved external method to exist, and only cause an error if they are called at run time.

    You should search the source code of your project for the methods openSettingsIOS and _Share. Determine their purpose and either provide a native method to implement them or remove them from the C# compilation using #if statements as I mentioned above.
     
  50. qosja

    qosja

    Joined:
    Oct 10, 2013
    Posts:
    14
    @JoshPeterson , so i had the plugin (of _share)not selected for android platform, i selected android. did the rebuild and now it gives another kind of error like below



    Code (CSharp):
    1. Win32Exception: ApplicationName='C:\Program Files\Unity\Hub\Editor\2018.4.3\Editor\Data\il2cpp/build/il2cpp.exe', CommandLine='--convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="legacyunity" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="Release" --outputpath="C:\Users\arman\Desktop\Bepart\Temp/StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="C:\Users\arman\Desktop\Bepart\Assets\..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2018.4.3\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2018.4.3\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="C:/Users/arman/Desktop/android-ndk-r16b" --map-file-parser="C:\Program Files\Unity\Hub\Editor\2018.4.3\Editor\Data\Tools\MapFileParser\MapFileParser.exe" --directory="C:\Users\arman\Desktop\Bepart\Temp\StagingArea\assets\bin\Data\Managed" --generatedcppdir="C:\Users\arman\Desktop\Bepart\Temp\StagingArea\Il2Cpp\il2cppOutput" ', CurrentDirectory='C:\Users\arman\Desktop\Bepart\Temp\StagingArea\assets\bin\Data\Managed'
    2. System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process)
    3. System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process)
    4. System.Diagnostics.Process.Start ()
    5. (wrapper remoting-invoke-with-check) System.Diagnostics.Process:Start ()
    6. UnityEditor.Utils.Program.Start (System.EventHandler exitCallback) (at C:/buildslave/unity/build/Editor/Mono/Utils/Program.cs:44)
    7. UnityEditor.Utils.Program.Start () (at C:/buildslave/unity/build/Editor/Mono/Utils/Program.cs:28)
    8. UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:106)
    9. UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1 setupStartInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    10. UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1 arguments, System.Action`1 setupStartInfo, System.String workingDirectory) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:368)
    11. UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (System.String inputDirectory, System.String outputDirectory, System.String workingDirectory, Boolean platformSupportsManagedDebugging) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:349)
    12. UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:211)
    13. UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:35)
    14. UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    15. UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    16. UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report)
    17. UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties)
    18. UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:286)
    19. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    20.