0
我們的團隊開始在一箇舊項目上工作,以修復錯誤並添加新功能。但是我們在密鑰庫文件上存在問題。項目更新到Unity 2017後,我們開始出現如下錯誤:Keystore不能在團結工作2017.1
CommandInvokationFailure: Failed to sign APK package.
/Users/work/Library/Android/sdk/build-tools/26.0.2/apksigner sign --ks
"/Users/work/Desktop/work game/MAIN/game.keystore" --ks-pass
pass:"***" --ks-key-alias "***" --key-pass pass:"***" "/Users/work/Desktop/work/game/MAIN/Temp/StagingArea/Package.apk"
stderr[
Failed to load signer "signer #1"
java.io.IOException: DerInputStream.getLength(): lengthTag=109, too big.
at java.base/sun.security.util.DerInputStream.getLength(DerInputStream.java:606)
at java.base/sun.security.util.DerValue.init(DerValue.java:390)
at java.base/sun.security.util.DerValue.<init>(DerValue.java:331)
at java.base/sun.security.util.DerValue.<init>(DerValue.java:344)
at java.base/sun.security.pkcs12.PKCS12KeyStore.engineLoad(PKCS12KeyStore.java:1953)
at java.base/sun.security.util.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:222)
at java.base/java.security.KeyStore.load(KeyStore.java:1479)
at com.android.apksigner.ApkSignerTool$SignerParams.loadKeyStoreFromFile(ApkSignerTool.java:829)
at com.android.apksigner.ApkSignerTool$SignerParams.loadPrivateKeyAndCertsFromKeyStore(ApkSignerTool.java:719)
at com.android.apksigner.ApkSignerTool$SignerParams.loadPrivateKeyAndCerts(ApkSignerTool.java:659)
at com.android.apksigner.ApkSignerTool$SignerParams.access$500(ApkSignerTool.java:611)
at com.android.apksigner.ApkSignerTool.sign(ApkSignerTool.java:266)
at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:89)
]
stdout[
]
exit code: 2
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)
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.HostView:OnGUI()
嘗試使用不同的JDK版本。更改了密鑰庫名稱,其目標但仍然是相同的結果。完全相同的密鑰存儲在Unity 5.6上運行。更新應該很快出版。儘快解決問題對我們至關重要。
不幸地嘗試過所有這些。 – Salranax
我們認爲這個問題是由團結2017引起的。回到團結5.6直到它得到解決。但仍在尋找解決方案。 – Salranax
我更新了答案,請嘗試。 –