0
\$\begingroup\$

Everything used to run fine until about 4-5 months ago. This week I've been stuck on this issue. I cannot even build empty apps.

Here are the steps I've made:

  1. Create blank Unity project.
  2. Switch to Android.
  3. Under Player Settings, switch "Scripting Backend" from Mono to IL2CPP.
  4. Change API Compatibility Level from .NET Standard 2.0 to .NET 4.x.
  5. Check ARM64 architecture (and make sure ARM7 is still checked).
  6. Change package name to "com.testcompany.testapp"
  7. In Build Settings check the "Build App Bundle (Google Play)" checkbox to ensure we get a .AAB instead of a .APK.

There is nothing special about the project, but when I build it, I get the below error:

Failed running C:\Program Files\Unity\Hub\Editor\2019.2.15f1\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:\Programming\x Test Apps\TestBlank1\TestBlank1\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="C:\Programming\x Test Apps\TestBlank1\TestBlank1\Assets..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="C:/Program Files/Unity/Hub/Editor/2019.2.15f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:/Program Files/Unity/Hub/Editor/2019.2.15f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="C:/Program Files/Unity/Hub/Editor/2019.2.15f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/android-ndk-r16b" --profiler-report --map-file-parser="C:/Program Files/Unity/Hub/Editor/2019.2.15f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe" --directory="C:/Programming/x Test Apps/TestBlank1/TestBlank1/Temp/StagingArea/assets/bin/Data/Managed" --generatedcppdir="C:/Programming/x Test Apps/TestBlank1/TestBlank1/Temp/StagingArea/Il2Cpp/il2cppOutput"

stdout: Building libil2cpp.so with AndroidToolChain Output directory: C:\Programming\x Test Apps\TestBlank1\TestBlank1\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a Cache directory: C:\Programming\x Test Apps\TestBlank1\TestBlank1\Library\il2cpp_android_armeabi-v7a\il2cpp_cache ObjectFiles: 110 of which compiled: 0 Total compilation time: 98 milliseconds. il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: C:\Program Files\Unity\Hub\Editor\2019.2.15f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\android-ndk-r16b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\User\AppData\Local\Temp\tmpB735.tmp" -o "C:\Programming\x Test Apps\TestBlank1\TestBlank1\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_E58CBCC113E4DAB418312994751884A4\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.15f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\android-ndk-r16b\platforms\android-16\arch-arm" -gcc-toolchain "C:\Program Files\Unity\Hub\Editor\2019.2.15f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\android-ndk-r16b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "C:\Program Files\Unity\Hub\Editor\2019.2.15f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a" -lgnustl_static -latomic -llog -rdynamic -fuse-ld=gold.exe

C:\Program Files\Unity\Hub\Editor\2019.2.15f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\android-ndk-r16b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin\ld.gold.exe: error: cannot open C:\Program Files\Unity\Hub\Editor\2019.2.15f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\android-ndk-r16b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/lib/../lib/armv7-a/libatomic.a: No such file or directory 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.15f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\android-ndk-r16b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\User\AppData\Local\Temp\tmpB735.tmp" -o "C:\Programming\x Test Apps\TestBlank1\TestBlank1\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_E58CBCC113E4DAB418312994751884A4\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.15f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\android-ndk-r16b\platforms\android-16\arch-arm" -gcc-toolchain "C:\Program Files\Unity\Hub\Editor\2019.2.15f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\android-ndk-r16b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "C:\Program Files\Unity\Hub\Editor\2019.2.15f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a" -lgnustl_static -latomic -llog -rdynamic -fuse-ld=gold.exe

C:\Program Files\Unity\Hub\Editor\2019.2.15f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\android-ndk-r16b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin\ld.gold.exe: error: cannot open C:\Program Files\Unity\Hub\Editor\2019.2.15f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\android-ndk-r16b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/lib/../lib/armv7-a/libatomic.a: No such file or directory 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, Action1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:71) UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List1, Action1, 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, Action1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:63) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.