Hello,
I could build my unity project since today. Don’t know what has changed.
OS: macOS Big Sur 11.2.3 (Xcode is up to date)
Unity Version: 2020.1.16f1
Gradle Version: 6.5
Scripting Backend: IL2CPP (ARMv7, ARM64)
Export out of Unity works fine, but building in Android Studio failed with strange errors:
Execution failed for task ‘:unityLibrary:BuildIl2CppTask’.
A problem occurred starting process ‘command ‘/Users/[path to app]/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/build/deploy/net471/il2cpp.exe’’
- Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ‘:unityLibrary:BuildIl2CppTask’.
Caused by: org.gradle.process.internal.ExecException: A problem occurred starting process ‘command ‘/Users/[path to app]/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/build/deploy/net471/il2cpp.exe’’
Caused by: net.rubygrapefruit.platform.NativeException: Could not start ‘/Users/[path to app]/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/build/deploy/net471/il2cpp.exe’
Cause: error=13, Permission denied
Even if I change rights of il2cpp.exe to 744 I get strange error code 126 (says that file couldn’t be executed).
finished with non-zero exit value
I wonder why my build.gradle file out of Unity gets configuration to .exe files:
def BuildIl2Cpp(String workingDir, String targetDirectory, String architecture, String abi, String configuration) {
exec {
commandLine(workingDir + “/src/main/Il2CppOutputProject/IL2CPP/build/deploy/net471/il2cpp.exe”,
“–compile-cpp”,
“–libil2cpp-static”,
“–platform=Android”,
“–architecture=” + architecture,
“–configuration=” + configuration,
“–outputpath=” + workingDir + targetDirectory + abi + “/libil2cpp.so”,
“–cachedirectory=” + workingDir + “/build/il2cpp_”+ abi + “_” + configuration + “/il2cpp_cache”,
“–additional-include-directories=” + workingDir + “/src/main/Il2CppOutputProject/IL2CPP/external/bdwgc/include”,
“–additional-include-directories=” + workingDir + “/src/main/Il2CppOutputProject/IL2CPP/libil2cpp/include”,
“–tool-chain-path=” + android.ndkDirectory,
“–map-file-parser=” + workingDir + “/src/main/Il2CppOutputProject/IL2CPP/MapFileParser/MapFileParser.exe”,
“–generatedcppdir=” + workingDir + “/src/main/Il2CppOutputProject/Source/il2cppOutput”,
“–baselib-directory=” + workingDir + “/src/main/jniStaticLibs/” + abi,
“–dotnetprofile=unityaot”)
environment “ANDROID_SDK_ROOT”, getSdkDir()
}
delete workingDir + targetDirectory + abi + “/libil2cpp.sym.so”
ant.move(file: workingDir + targetDirectory + abi + “/libil2cpp.dbg.so”, tofile: workingDir + “/symbols/” + abi + “/libil2cpp.so”)
}
I spent two days in exploring this issue but no fix found yet. Is there anyone who has a clue what to do to fix that problem? I really need to build my project these days.
Thanks in advance for every suggestion to fix that issue.