- Home /
Win32Exception for Android signed build on Unity 2017.3.1 Mac
I'm trying to sign my Android apk... build is fine for unsigned (debug) but when signed this error occurs:
Not sure what's going on with Win32 as I'm on Mac!
Win32Exception: ApplicationName='/Users/username/NVPACK/android-sdk-macosx/build-tools/26.0.0/apksigner', CommandLine='sign --ks "/Users/username/MyProjects/appname/appname/user.keystore" --ks-pass stdin --ks-key-alias "mykey" --key-pass stdin "/Users/username/MyProjects/appname/appname/Temp/StagingArea/Package.apk"', CurrentDirectory='Temp/StagingArea' System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) System.Diagnostics.Process.Start () (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.RunWithStdin (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg, System.String[] input) UnityEditor.Android.PostProcessor.Tasks.TasksCommon.Exec (System.String command, System.String args, System.String workingdir, System.String errorMsg, System.String[] stdin) UnityEditor.Android.PostProcessor.Tasks.BuildAPK.SignPackage (UnityEditor.Android.PostProcessor.PostProcessorContext context) UnityEditor.Android.PostProcessor.Tasks.BuildAPK.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 /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:272) UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
Just in case, make sure your IDE is detached from Unity (not debugging it). I got the error on Linux and the error message is different (mentions unity_csc.sh) so not sure it's the same. And yes it said Win32Exception on Linux too, may be a $$anonymous$$ono thing.
Answer by atsamy · Mar 12, 2018 at 04:35 PM
Did you manage to solve this problem, am facing the same thing.
Answer by mohanrao164 · Mar 19, 2018 at 05:44 AM
I found the solution for signed android APK . It is because of the build-tools version. Earlier i was using "26.0.0" and i replaced with the version of "27.0.3" and it worked for me. i.e. android-sdk-macosx/build-tools/26.0.0 with android-sdk-macosx/build-tools/27.0.3.
Answer by apppublisher · Nov 15, 2020 at 02:29 PM
it is beacause you use android build with windows editor, i don't know how to change that, maybe reinstall version or switch to newer. Hope you will find it useful even just a little