Failed to sign APK package (Unity 2017)

CommandInvokationFailure: Failed to sign APK package.
C:\android_sdk\build-tools\25.0.2\apksigner.bat sign --ks “D:\work\musiverse_git_2017\android_keys/keys.keystore” --ks-pass pass:“mykspass” --ks-key-alias “musiverse” --key-pass pass:“mykeypasspart1-=ChYmykeypasspart2” “D:\work\musiverse_git_2017\Temp/StagingArea/Package.apk”

Exception in thread “main” D:\work\musiverse_git_2017\Temp\StagingArea\Package.apk-=ChY (The system cannot find the file specified)

As you see part of my key pass is after the filename Package.apk. Actually wtf? How can I escape the characters in my key pass? This was not a problem in any Unity 4 or 5 versions, only in 2017!

(Also there is no Unity 2017 topic)

Under Publishing Settings, try changing the Build System to Gradle (New) instead of Internal (Default)

I also faced the same issue. But I was able to fix. The reason for the issue was that, I have not given the path for the ‘keystore’.

click> Browse Keystore > choose the path

It worked.109046-screen-shot-2018-01-11-at-60011-pm.png

I got the same problem.

Up, I got the same problem

Did somebody find a fix?

I had to downgrade to an older android version to even get to this point, because otherwise i get this error: “unable to target list platforms”

and now it seems like the way to fix this is to have the newest android version? zzz

working on a school project that needs to be handed in real soon and i’m going mental from “failed to sign apk package” xxxxxxx

I’m with the same problem, tried everything:

package name is correct: com.mycompany.mygame

passwords of the keystore and alias double checked

Android Studio Updated (with a tools version that works)

Install location in: Automatic

JDK: jdk1.8.0_161

I really do not know what I need to do! :confused:

Unity 2017.3.1f1

Error that I’m receiving:

UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
  at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0020e] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:181 
  at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00065] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:88 
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Maybe I’m To Late But, For Me Problem Caused Incorrect Keystore Password And Alias Password!

Hello there…

I solved this issue by replacing the tools file in the Android SDK for an older version (25.2.5) and unchecking the “Use Embedded JDK” option for the Java path in my C drive. Also created a PATH_JAVA route at system level, but not sure how much influence in the solution it had. Hope that helps!

Switching to Gradle vs. Internal fixed mine as well, after making sure that I had a path and correct password to my keystore.

Hi. I have the same problem. But I don’t want to sign the app. I don’t have any keystore yet. I just want to test the app.
What is the solution?

I have solved this issue by changing build system “internal” to “gradle” in build settings .I am using unity version 2018.4.12f

Just Update you android sdk.103952-capture1.png