2017-07-16 69 views
3

當我嘗試建立團結我的apk我得到這些錯誤的信息:錯誤與密鑰庫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() 

我只得到那些消息時,我有一個密鑰庫 請幫助我

回答

6

這是由Android SDK構建中的已知問題工具26.0.0 - 它不見了apksigner。直到生成工具的新版本發佈時,有兩種解決方法:

  • 切換到舊版本的Android SDK構建工具(例如,25.0.3)的,或
  • 副本apksigner(和/或apksigner.bat在Windows )和lib/apksigner.jar從舊版本的構建工具改爲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

+0

這真的救了我的一天!由於某些原因,SDK 23也沒有這些文件 – Konstantin

+0

這需要投票正確的答案。拯救了我的一天 - 我希望我在18個小時前找到了這個... – ina