密钥库apk统一错误

时间:2017-07-16 16:49:33

标签: android unity3d apk keystore

当我尝试在团结中构建我的apk时,我会收到错误消息:

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()

当我有一个密钥库时,我只收到这些消息 请帮助我

1 个答案:

答案 0 :(得分:7)

这是由Android SDK Build Tools 26.0.0中的已知问题引起的 -  它缺少apksigner。在发布较新版本的Build Tools之前,有两种解决方法:

  • 切换到旧版Android SDK构建工具(例如25.0.3)或
  • apksigner(和/或apksigner.bat在Windows上)和lib/apksigner.jar从较旧版本的Build Tools复制到build-tools/26.0.0/

请参阅https://github.com/bazelbuild/bazel/issues/3258https://issuetracker.google.com/issues/62696222

编辑:Android SDK Build Tools 26.0.1已发布。它包含apksigner