Error with unity keystore apk
When I try to build my apk on unity, I get these wrong messages:
1.
Win32Exception: ApplicationName='/Users/kristianstenberg/Library/Android/sdk/build-tools/26.0.0/apksigner', CommandLine='sign --ks "/Users/kristianstenberg/Desktop/Platformer/VegardHansenStenberg.keystore" --ks-pass pass:"Balder123" --ks-key-alias "besquare" --key-pass pass:"Balder123" "/Users/kristianstenberg/Desktop/Platformer/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.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.PostProcessor.Tasks.TasksCommon.Exec (System.String command, System.String args, System.String workingdir, System.String errorMsg, Int32 retriesOnFailure)
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:263)
UnityEditor.HostView:OnGUI()
2.
UnityEditor.BuildPlayerWindow+BuildMethodException: Build failed with errors.
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x001b9] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:162
at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00050] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:83
UnityEditor.HostView:OnGUI()
I only get messages when I have a keystore Please help me
+3
source to share
2 answers
This is caused by a known issue in Android SDK Build Tools 26.0.0 - it is missing apksigner
. Until a newer version of Build Tools is released, there are two workarounds:
- switch to an older version of Android SDK Build Tools (for example
25.0.3
), or - copy
apksigner
(and / orapksigner.bat
on Windows) andlib/apksigner.jar
from the older Build Tools tobuild-tools/26.0.0/
.
See https://github.com/bazelbuild/bazel/issues/3258 and https://issuetracker.google.com/issues/62696222 .
EDIT: Android SDK Build Tools 26.0.1 has been posted. Contains apksigner
.
+7
source to share