title: Unity Build - Exception: il2cpp.exe did not run properly
body: <p>Using Unity <strong>2017.4.34f1 (LTS)</strong> with <strong>IL2CPP</strong> with <strong>NDK r13b</strong>, I try to export my Unity Project to Android Project (Build Process).</p>
  <p>Note: I'm using IL2CPP because Google PlayStore want both 32 &amp; 64bit, so i cant use <strong>Mono</strong> anymore as <strong>scripting backend</strong>.</p>
  <p>However, it's failed and I got below error:</p>
  <pre><code>Exception: C:\Program Files\Unity\Hub\Editor\2017.4.34f1\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)
  </code></pre>
  <p>and one more error log:</p>
  <pre><code>Failed running C:\Program Files\Unity\Hub\Editor\2017.4.34f1\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --development-mode --compile-cpp --libil2cpp-static --platform=&quot;Android&quot; --architecture=&quot;ARMv7&quot; --configuration=&quot;Release&quot; --outputpath=&quot;C:\Users\zukinaru\Desktop\orisnowyndo\Temp/StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so&quot; --cachedirectory=&quot;C:\Users\zukinaru\Desktop\orisnowyndo\Assets\..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache&quot; --additional-include-directories=&quot;C:\Program Files\Unity\Hub\Editor\2017.4.34f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\bdwgc/include&quot; --additional-include-directories=&quot;C:\Program Files\Unity\Hub\Editor\2017.4.34f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\libil2cpp/include&quot; --tool-chain-path=&quot;C:/android-ndk-r13b-windows-x86_64/android-ndk-r13b&quot; --map-file-parser=&quot;C:\Program Files\Unity\Hub\Editor\2017.4.34f1\Editor\Data\Tools\MapFileParser\MapFileParser.exe&quot; --assembly=&quot;C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\Assembly-CSharp-firstpass.dll&quot; --assembly=&quot;C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\Assembly-CSharp.dll&quot; --assembly=&quot;C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.UI.dll&quot; --assembly=&quot;C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\DOTween.dll&quot; --assembly=&quot;C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\Facebook.Unity.Settings.dll&quot; --assembly=&quot;C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\PlayMaker.dll&quot; --assembly=&quot;C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\TextMeshPro-1.0.55.2017.1.0b12.dll&quot; --assembly=&quot;C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.Analytics.dll&quot; --assembly=&quot;C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.dll&quot; --assembly=&quot;C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\Facebook.Unity.Android.dll&quot; --assembly=&quot;C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\Facebook.Unity.Canvas.dll&quot; --assembly=&quot;C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\Facebook.Unity.IOS.dll&quot; --assembly=&quot;C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\mscorlib.dll&quot; --assembly=&quot;C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\Stores.dll&quot; --assembly=&quot;C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.Purchasing.dll&quot; --generatedcppdir=&quot;C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput&quot; 
  
  stdout:
  Building libil2cpp.so with AndroidToolChain.
      Output directory: C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a
      Cache directory: C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache
  ObjectFiles: 691 of which compiled: 282
      Time Compile: 54396 milliseconds Il2CppAttributes.cpp
      Time Compile: 23198 milliseconds Bulk_TextMeshPro-1.0.55.2017.1.0b12_0.cpp
      Time Compile: 21138 milliseconds Il2CppInvokerTable.cpp
      Time Compile: 20951 milliseconds Bulk_mscorlib_16.cpp
      Time Compile: 16387 milliseconds Bulk_Assembly-CSharp_19.cpp
      Time Compile: 15667 milliseconds Bulk_mscorlib_17.cpp
      Time Compile: 13478 milliseconds GenericMethods24.cpp
      Time Compile: 13394 milliseconds Il2CppMetadataUsage.cpp
      Time Compile: 13278 milliseconds Bulk_Mad2D_0.cpp
      Time Compile: 12015 milliseconds Bulk_mscorlib_10.cpp
  Total compilation time: 765251 milliseconds.
  il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: C:\android-ndk-r13b-windows-x86_64\android-ndk-r13b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @&quot;C:\Users\zukinaru\AppData\Local\Temp\tmp56A5.tmp&quot; -o &quot;C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_6D290C36A270BA4A86083617583BFE15\libil2cpp.so&quot; -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot &quot;C:\android-ndk-r13b-windows-x86_64\android-ndk-r13b\platforms\android-16\arch-arm&quot; -gcc-toolchain &quot;C:\android-ndk-r13b-windows-x86_64\android-ndk-r13b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64&quot; -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L &quot;C:\android-ndk-r13b-windows-x86_64\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a&quot; -lgnustl_static -llog -Xlinker -Map=&quot;C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_6D290C36A270BA4A86083617583BFE15\libil2cpp.map&quot; -rdynamic -fPIE -pie -fuse-ld=bfd.exe
  
  clang++.exe: warning: argument unused during compilation: '-pie'
  C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_init_m2214171880':
  C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:543: undefined reference to `init'
  C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_logout_m2238411584':
  C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:571: undefined reference to `logout'
  C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:571: undefined reference to `logout'
  C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_activateApp_m160690348':
  C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:581: undefined reference to `activateApp'
  C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:581: undefined reference to `activateApp'
  C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_logPurchase_m2329488507':
  C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:605: undefined reference to `logPurchase'
  C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_ui_m1731210125':
  C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:635: undefined reference to `ui'
  C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_initScreenPosition_m891649343':
  C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:657: undefined reference to `initScreenPosition'
  C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:657: undefined reference to `initScreenPosition'
  clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
  
  
     at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(IEnumerable`1 objectFiles, CppToolChainContext toolChainContext)
     at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics&amp; statistics)
     at Unity.IL2CPP.Building.Statistics.BuildingTestRunnerHelper.BuildAndLogStatsForTestRunner(CppProgramBuilder builder, IBuildStatistics&amp; 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:\android-ndk-r13b-windows-x86_64\android-ndk-r13b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @&quot;C:\Users\zukinaru\AppData\Local\Temp\tmp56A5.tmp&quot; -o &quot;C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_6D290C36A270BA4A86083617583BFE15\libil2cpp.so&quot; -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot &quot;C:\android-ndk-r13b-windows-x86_64\android-ndk-r13b\platforms\android-16\arch-arm&quot; -gcc-toolchain &quot;C:\android-ndk-r13b-windows-x86_64\android-ndk-r13b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64&quot; -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L &quot;C:\android-ndk-r13b-windows-x86_64\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a&quot; -lgnustl_static -llog -Xlinker -Map=&quot;C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_6D290C36A270BA4A86083617583BFE15\libil2cpp.map&quot; -rdynamic -fPIE -pie -fuse-ld=bfd.exe
  
  clang++.exe: warning: argument unused during compilation: '-pie'
  C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_init_m2214171880':
  C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:543: undefined reference to `init'
  C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_logout_m2238411584':
  C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:571: undefined reference to `logout'
  C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:571: undefined reference to `logout'
  C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_activateApp_m160690348':
  C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:581: undefined reference to `activateApp'
  C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:581: undefined reference to `activateApp'
  C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_logPurchase_m2329488507':
  C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:605: undefined reference to `logPurchase'
  C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_ui_m1731210125':
  C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:635: undefined reference to `ui'
  C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\43B0E2C486C7D35B13D99EAC9094B83F.o: In function `CanvasJSWrapper_initScreenPosition_m891649343':
  C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:657: undefined reference to `initScreenPosition'
  C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity.Canvas_0.cpp:657: undefined reference to `initScreenPosition'
  clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
  
  
     at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(IEnumerable`1 objectFiles, CppToolChainContext toolChainContext)
     at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics&amp; statistics)
     at Unity.IL2CPP.Building.Statistics.BuildingTestRunnerHelper.BuildAndLogStatsForTestRunner(CppProgramBuilder builder, IBuildStatistics&amp; 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)
  </code></pre>
  <p>What I've Done so far:</p>
  <ol>
  <li><p>Try to use <strong>NDK r16b</strong>, but failed because Unity 2017.4 only want <strong>NDK r13b</strong></p>
  </li>
  <li><p>Run Unity as Administrator, but still not solve</p>
  </li>
  </ol>
  <p>==UPDATE LOG (Unity 2017.4.39):</p>
  <pre><code>Exception: C:\Program Files\Unity\Hub\Editor\2017.4.39f1\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)
  </code></pre>
  <p>===UPDATE (Unity 2017.4.8f1)</p>
  <p>Has Tried with <strong>Unity 2017.4.8f1</strong> (The Original where i was succesfull build APK) but still failed to export to <code>Android Studio Project</code> with x64 (IL2CPP), I'm planning to build AppBundle x64 using exported Android Native/Android Studio.</p>
  <p><strong>If using internal (32bit) it was succesfull</strong>, but Google now need <strong>x64 APK/AppBundle</strong> Build. If i knew this before, i would using <code>IL2CPP</code> from beginning (not internal), it's so frustating error to solve. If i'm doing migration to <code>Unity 2019</code> now, too much effort to do...</p>
  <p>===Update (newest)</p>
  <p>Using Unity <strong>v2017.4.40f</strong>, i got below error:</p>
  <blockquote>
  <p>CommandInvokationFailure: Gradle build failed.  C:/Program
  Files/Java/jdk1.8.0_202\bin\java.exe -classpath
  &quot;C:\Unity2017\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-5.1.1.jar&quot;
  org.gradle.launcher.GradleMain &quot;-Dorg.gradle.jvmargs=-Xmx4096m&quot;
  &quot;bundleRelease&quot;</p>
  <p>stderr[</p>
  <p>FAILURE: Build completed with 2 failures.</p>
  <h2>1: Task failed with an exception.</h2>
  <ul>
  <li><p>Where: Build file 'C:\Users\zukijuki\project\apps\Temp\gradleOut\build.gradle'
  line: 28</p>
  </li>
  <li><p>What went wrong: A problem occurred evaluating root project 'gradleOut'.</p>
  </li>
  </ul>
  <blockquote>
  <p>Could not find method implementation() for arguments [{name=com.google.android.gms.play-services-drive-11.0.4, ext=aar}] on
  object of type
  org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.</p>
  </blockquote>
  <ul>
  <li>Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  ==============================================================================</li>
  </ul>
  <h2>2: Task failed with an exception.</h2>
  <ul>
  <li>What went wrong: A problem occurred configuring root project 'gradleOut'.</li>
  </ul>
  <blockquote>
  <p>buildToolsVersion is not specified.</p>
  </blockquote>
  <ul>
  <li><p>Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  ==============================================================================</p>
  </li>
  <li><p>Get more help at <a href="https://help.gradle.org" rel="nofollow noreferrer">https://help.gradle.org</a></p>
  </li>
  </ul>
  <p>BUILD FAILED in 1m 27s ] stdout[</p>
  <p>Welcome to Gradle 5.1.1!</p>
  <p>Here are the highlights of this release:</p>
  <ul>
  <li>Control which dependencies can be retrieved from which repositories</li>
  <li>Production-ready configuration avoidance APIs</li>
  </ul>
  <p>For more details see <a href="https://docs.gradle.org/5.1.1/release-notes.html" rel="nofollow noreferrer">https://docs.gradle.org/5.1.1/release-notes.html</a></p>
  <p>Starting a Gradle Daemon (subsequent builds will be faster) ] exit
  code: 1 UnityEditor.Android.Command.WaitForProgramToRun
  (UnityEditor.Utils.Program p,
  UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit,
  System.String errorMsg) UnityEditor.Android.Command.Run
  (System.Diagnostics.ProcessStartInfo psi,
  UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit,
  System.String errorMsg) UnityEditor.Android.AndroidJavaTools.RunJava
  (System.String args, System.String workingdir, System.Action<code>1 progress, System.String error) UnityEditor.Android.GradleWrapper.Run (System.String workingdir, System.String task, System.Action</code>1
  progress) Rethrow as GradleInvokationException: Gradle build failed
  UnityEditor.Android.GradleWrapper.Run (System.String workingdir,
  System.String task, System.Action`1 progress)
  UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute
  (UnityEditor.Android.PostProcessor.PostProcessorContext context)
  UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks
  (UnityEditor.Android.PostProcessor.PostProcessorContext context)
  UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)</p>
  <p>===</p>
  <p>Build completed with a result of 'Failed'
  UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)</p>
  <p>====</p>
  <p>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)</p>
  </blockquote>