I just updated to Unity 2017.1.0f3 and when I try to build my APK using Internal (default) I’m getting error messages. I read that Android signing process was updated, and is there any thing new I need to do to make it build in Unity 2017? I had no issues build the same APK in Unity 5.6.
have uploaded a bug report and the number is 930255
I have tested and it seems if a keystore is used it errors out. If no keystore is used it build the apk without issues.
Yury-Habets’ workaround didn’t work for me.
But this one worked
Changing tools folder wasn’t necessary for me, I’m using tools v.26.0.2.
UDP
Ok, now I see that Yury-Habets didn’t mean to change tools folder, he was talking about build-tools folder, but mistakenly gave download links to older tools folder.
All you need is to download a previous version of build-tools using Android Studio SDK Manager and do as quoted.
hi ,
I’ve applied the workaround , and got this error
CommandInvokationFailure: Failed to sign APK package.
D:\Android\sdk\build-tools\25.0.3\apksigner.bat sign --ks “D:/Work/GamePower7.keystore” --ks-pass pass:“V,Tmqm5DXJ$j/&%,sz” --ks-key-alias “damar on lin” --key-pass pass:“~w#FV3ua;fCeGIE~3zIh” “C:\Users\h.safa\Source\Workspaces\BagoonV5\BagoonV5\Temp/StagingArea/Package.apk”
stderr[
Failed to load signer “signer #1”
java.io.IOException: Keystore was tampered with, or password was incorrect
at sun.security.provider.JavaKeyStore.engineLoad(Unknown Source)
at sun.security.provider.JavaKeyStore$JKS.engineLoad(Unknown Source)
at sun.security.provider.KeyStoreDelegator.engineLoad(Unknown Source)
at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(Unknown Source)
at java.security.KeyStore.load(Unknown Source)
at com.android.apksigner.ApkSignerTool$SignerParams.loadKeyStoreFromFile(ApkSignerTool.java:734)
at com.android.apksigner.ApkSignerTool$SignerParams.loadPrivateKeyAndCertsFromKeyStore(ApkSignerTool.java:636)
at com.android.apksigner.ApkSignerTool$SignerParams.loadPrivateKeyAndCerts(ApkSignerTool.java:580)
at com.android.apksigner.ApkSignerTool$SignerParams.access$200(ApkSignerTool.java:534)
at com.android.apksigner.ApkSignerTool.sign(ApkSignerTool.java:229)
at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:87)
Caused by: java.security.UnrecoverableKeyException: Password verification failed
… 11 more
]
stdout[
UnityEditor.BuildPlayerWindow+BuildMethodException: Build failed with errors.
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x001b9] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:162
at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00050] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:83
UnityEditor.HostView:OnGUI()