'Unity Build - Exception: il2cpp.exe did not run properly
Using Unity 2017.4.34f1 (LTS) with IL2CPP with NDK r13b, I try to export my Unity Project to Android Project (Build Process).
Note: I'm using IL2CPP because Google PlayStore want both 32 & 64bit, so i cant use Mono anymore as scripting backend.
However, it's failed and I got below error:
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)
and one more error log:
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="Android" --architecture="ARMv7" --configuration="Release" --outputpath="C:\Users\zukinaru\Desktop\orisnowyndo\Temp/StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="C:\Users\zukinaru\Desktop\orisnowyndo\Assets\..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2017.4.34f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2017.4.34f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="C:/android-ndk-r13b-windows-x86_64/android-ndk-r13b" --map-file-parser="C:\Program Files\Unity\Hub\Editor\2017.4.34f1\Editor\Data\Tools\MapFileParser\MapFileParser.exe" --assembly="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\Assembly-CSharp-firstpass.dll" --assembly="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\Assembly-CSharp.dll" --assembly="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.UI.dll" --assembly="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\DOTween.dll" --assembly="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\Facebook.Unity.Settings.dll" --assembly="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\PlayMaker.dll" --assembly="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\TextMeshPro-1.0.55.2017.1.0b12.dll" --assembly="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.Analytics.dll" --assembly="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.dll" --assembly="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\Facebook.Unity.Android.dll" --assembly="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\Facebook.Unity.Canvas.dll" --assembly="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\Facebook.Unity.IOS.dll" --assembly="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\mscorlib.dll" --assembly="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\Stores.dll" --assembly="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.Purchasing.dll" --generatedcppdir="C:\Users\zukinaru\Desktop\orisnowyndo\Temp\StagingArea\Il2Cpp\il2cppOutput"
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++ @"C:\Users\zukinaru\AppData\Local\Temp\tmp56A5.tmp" -o "C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_6D290C36A270BA4A86083617583BFE15\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "C:\android-ndk-r13b-windows-x86_64\android-ndk-r13b\platforms\android-16\arch-arm" -gcc-toolchain "C:\android-ndk-r13b-windows-x86_64\android-ndk-r13b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "C:\android-ndk-r13b-windows-x86_64\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a" -lgnustl_static -llog -Xlinker -Map="C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_6D290C36A270BA4A86083617583BFE15\libil2cpp.map" -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& 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: C:\android-ndk-r13b-windows-x86_64\android-ndk-r13b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\zukinaru\AppData\Local\Temp\tmp56A5.tmp" -o "C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_6D290C36A270BA4A86083617583BFE15\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "C:\android-ndk-r13b-windows-x86_64\android-ndk-r13b\platforms\android-16\arch-arm" -gcc-toolchain "C:\android-ndk-r13b-windows-x86_64\android-ndk-r13b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "C:\android-ndk-r13b-windows-x86_64\android-ndk-r13b\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a" -lgnustl_static -llog -Xlinker -Map="C:\Users\zukinaru\Desktop\orisnowyndo\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_6D290C36A270BA4A86083617583BFE15\libil2cpp.map" -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& 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)
What I've Done so far:
Try to use NDK r16b, but failed because Unity 2017.4 only want NDK r13b
Run Unity as Administrator, but still not solve
==UPDATE LOG (Unity 2017.4.39):
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)
===UPDATE (Unity 2017.4.8f1)
Has Tried with Unity 2017.4.8f1 (The Original where i was succesfull build APK) but still failed to export to Android Studio Project
with x64 (IL2CPP), I'm planning to build AppBundle x64 using exported Android Native/Android Studio.
If using internal (32bit) it was succesfull, but Google now need x64 APK/AppBundle Build. If i knew this before, i would using IL2CPP
from beginning (not internal), it's so frustating error to solve. If i'm doing migration to Unity 2019
now, too much effort to do...
===Update (newest)
Using Unity v2017.4.40f, i got below error:
CommandInvokationFailure: Gradle build failed. C:/Program Files/Java/jdk1.8.0_202\bin\java.exe -classpath "C:\Unity2017\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-5.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "bundleRelease"
stderr[
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
Where: Build file 'C:\Users\zukijuki\project\apps\Temp\gradleOut\build.gradle' line: 28
What went wrong: A problem occurred evaluating root project 'gradleOut'.
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.
- 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. ==============================================================================
2: Task failed with an exception.
- What went wrong: A problem occurred configuring root project 'gradleOut'.
buildToolsVersion is not specified.
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. ==============================================================================
Get more help at https://help.gradle.org
BUILD FAILED in 1m 27s ] stdout[
Welcome to Gradle 5.1.1!
Here are the highlights of this release:
- Control which dependencies can be retrieved from which repositories
- Production-ready configuration avoidance APIs
For more details see https://docs.gradle.org/5.1.1/release-notes.html
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
1 progress, System.String error) UnityEditor.Android.GradleWrapper.Run (System.String workingdir, System.String task, System.Action
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)===
Build completed with a result of 'Failed' UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
====
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)
Solution 1:[1]
I have just ran into this issue, and believe I figured out one of the solutions to this underlying IL2CPP build issue. I have the solution in bold below to get to the point. The following is what I discovered. My issue was due to following error:
stdout:
Building build.bc with EmscriptenToolChain
Output directory: D:\xxxx\Unity\Projects\01_2d_projects\SiteEstablish\Temp\StagingArea\Data\Native
Cache directory: D:\xxxx\Unity\Projects\01_2d_projects\SiteEstablish\Library\il2cpp_cache
il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: File "C:\Users\xxxxxxx\AppData\Local\Programs\Python\Python37-32\Lib\site.py", line 177
file=sys.stderr)
^
I had a pretty good hunch that there is no reason that should be running that file, and could only think of one area that can be coming from, the "Environment Variables". The path was located under "PATH", as "%PYTHONPATH%", which then would be the only connection to that directory with the fail. Even with those items removed from "Environment Variables", the path was still getting hit. I ended up moving the Python directory to a different location altogether, and then switched the platform from Windows back to WebGL, which then succeeded. This might have been possible without removing the directory files, but I didn't know how the behavior of Unity builds work. I tried to recreate the issue, but the builds still succeeded. So, all I can do is hope this helps.
Semi-Solution (please take caution in doing the following. If you remove paths from system variables, you can have a very bad day!):
In your error, you will need to find the directory paths within the "Path" system variable, and remove it. Below, you it will probably be something like "C:\Users\zukinaru\Desktop\" and can be more detailed:
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
Like in my image, find that "Path" variable on your system, and remove the path (save what you do so you can place them back after). Click "Ok" till it's all saved. Switch platforms from whatever back to "WebGL". I have belief that the mini applications within IL2CPP might be pulling from these system variables, and it's messing with the builds that way. I believe that's why I see this issue out there, but the errors are just slightly off, due to everyone's path variable settings all being different from pc to pc.
Solution 2:[2]
It seems you might used a Facebook plugin that is developed for newer version of Unity.
To confirm this you use an empty project + Facebook(or other plugin you'd like to test) and build it, see if the error happens.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | Simon |