- Home /
Unity Android IL2CPP Build Error
When I use IL2CPP when I want to install the game, it gives an error and I cannot get APK Output. (The MONO option works fine.)
I've been dealing with it for a week, I would be glad if you could help me.
Detailed output of the error on the console screen:
Internal build system error. BuildProgram exited with code -2147024893. System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files\Unity\Hub\Editor\2021.2.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\Variations\�l2cpp\Release\StaticLibs\armeabi-v7a\compile.rsp'. at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle) at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize) at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks) at System.IO.File.InternalReadAllText(String path, Encoding encoding) at System.IO.File.ReadAllText(String path) at NiceIO.NPath.SystemIOFileSystem.File_ReadAllText(NPath path) at NiceIO.NPath.WindowsFileSystem.File_ReadAllText(NPath path) at Bee.Core.Stevedore.VirtualFileSystem.File_ReadAllText(NPath path) at NiceIO.NPath.RelayingFileSystem.File_ReadAllText(NPath path) at Bee.Core.BuildProgramFileSystem.File_ReadAllText(NPath path) at NiceIO.NPath.ReadAllText() at AndroidPlayerBuildProgram.AndroidPlayerBuildProgram.SetupCompile(AndroidSharedLibraryConfiguration config, String name, AndroidTargetDeviceType deviceType, NPath sourceFilePath) at AndroidPlayerBuildProgram.AndroidPlayerBuildProgram.SetupLibUnityLibrary()+MoveNext() at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection) at System.Collections.Generic.List`1.AddRange(IEnumerable`1 collection) at AndroidPlayerBuildProgram.AndroidPlayerBuildProgram.SetupPlayerBuild() at PlayerBuildProgramLibrary.PlayerBuildProgramBase.RunBuildProgram() at PlayerBuildProgramTypeWrapper.Run(String[] args) at Program.Main(String[] args) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Add comment
could you check this path exists?
C:\Program Files\Unity\Hub\Editor\2021.2.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\Variations
inside Variations there should be il2cpp folder, check if exits
@xxmariofer Thanks for your reply, the file path is not missing anything.
The error means it can't locate the compile.rsp file, if that file exists the problem would be probably with the directory name symbol (the l2cpp folder) I would first try to build the apk not targeting armv7, you can find in the build settings under android build settings a toggle selecting armv7 and other types (like arm64) try to select other
Answer by unity_JhsnEsH2AQ_NpQ · Dec 22, 2021 at 07:15 PM
@xxmariofer When I build apk not targeting Armv7, I get the same error for Arm64.
Downloading the android sdk manually instead of using the unity hub default one will most likely solve the issue since it's a problem with paths, if you have already android sdk installed changed unity preference to use the other sdk
@xxmariofer I installed the sdk and jdk files in an external folder, (D:), and changed the file path in the External Tools screen. But nothing about the error has changed.
It still tries to reach the C: folder and gives the same error.
It is hard to say, have you tried building using mono instead of il2cpp, that must work 100%
@xxmariofer I need to use il2cpp and Release options to upload to google play. Am I wrong?
Your answer
Follow this Question
Related Questions
Can't build for Android with IL2CPP 1 Answer
Can not build to Android with backend Il2cpp 2 Answers
il2cpp android build error unity 2019.1.6f1 6 Answers
Android Build Fail, CommandInvokationFailure 1 Answer
Cannot build Android IL2CPP for Unity 5 Answers