본문 바로가기
개발/Unity

Mac)해결)Unity)Error building Player: Win32Exception: Application Name ='~/AndroidPlayer/SDK/tools/bin/sdkmanager'

by 테샤르 2021. 3. 23.

Error building Player: Win32Exception: Application Name ='~/AndroidPlayer/SDK/tools/bin/sdkmanager'

이런 에러가 나기 시작했다. 

환경은 Mac 에서 Android Build를 진행하는 과정에서 빌드가 실패가 되고 실제 빌드도 안 되는 상황이다.

단순하게 Access denied 를 보고 권한이 없구나로 생각을 해서 권한 명령어인 chown을 사용해서 해당 권한을 받고 처리를 해보려고 했으나 실패.

디버깅에 찍힌 로그는 다음과 같았다.

 

Win32Exception: ApplicationName='/Applications/Unity/2019.4.7f1/PlaybackEngines/AndroidPlayer/SDK/tools/bin/sdkmanager', CommandLine='--list', CurrentDirectory='/Users/Documents/WorkSpace/BaseUnityProject/BaseUnityProject', Native error= Access denied
System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) (at <14e3453b740b4bd690e8d4e5a013a715>:0)
System.Diagnostics.Process.Start () (at <14e3453b740b4bd690e8d4e5a013a715>:0)
(wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start()
UnityEditor.Utils.Program.Start (System.EventHandler exitCallback) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Utils/Program.cs:44)
UnityEditor.Utils.Program.Start () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Utils/Program.cs:28)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <d265dd4439034d6c9926c590736e62a5>:0)
UnityEditor.Android.AndroidSDKTools.RunAndroidSdkTool (System.String toolName, System.String arguments, System.Boolean updateCommand, System.String errorMsg, System.String toolsDir, System.String[] warningsToIgnore) (at <d265dd4439034d6c9926c590736e62a5>:0)
UnityEditor.Android.AndroidSDKTools.ListComponentsVersions () (at <d265dd4439034d6c9926c590736e62a5>:0)
UnityEditor.Android.SDKManager.UpdatePackagesList () (at <d265dd4439034d6c9926c590736e62a5>:0)
UnityEditor.Android.SDKManager.HighestVersionInstalled (UnityEditor.Android.SDKManager+Component tool) (at <d265dd4439034d6c9926c590736e62a5>:0)
UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK+SDKToolsDetector.GetVersion () (at <d265dd4439034d6c9926c590736e62a5>:0)
UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK+SDKComponentDetector.Detect (System.Version minVersion, UnityEditor.Android.PostProcessor.ProgressHandler onProgress) (at <d265dd4439034d6c9926c590736e62a5>:0)
UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK.EnsureSDKComponentVersion (System.Version minVersion, UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK+SDKComponentDetector detector) (at <d265dd4439034d6c9926c590736e62a5>:0)
UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <d265dd4439034d6c9926c590736e62a5>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <d265dd4439034d6c9926c590736e62a5>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PrepareForBuild (UnityEditor.BuildOptions options, UnityEditor.BuildTarget target) (at <d265dd4439034d6c9926c590736e62a5>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PrepareForBuild (UnityEditor.BuildOptions options, UnityEditor.BuildTarget target) (at <d265dd4439034d6c9926c590736e62a5>:0)
UnityEditor.PostprocessBuildPlayer.PrepareForBuild (UnityEditor.BuildOptions options, UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:149)
UnityEditor.BuildPipeline:BuildPlayer(BuildPlayerOptions)
BuildPlayer:Build_AOS_Debug() (at Assets/BaseUnityProject/Editor/BuildPlayer.cs:49)

해결방법은 단순했다.

해당 문제가 생기는 파일인 'sdkmanager'를 다른곳에 복사 후 원본을 삭제 후 다시 붙여 넣기를 하면 된다.

 

해결 참고 링크 : [ 링크 ]

 

Native error= Access denied when building the project - Unity Answers

 

answers.unity.com

 

★☆

 

 

 

 

반응형

댓글