APK Signing Failed! Unable to determine signature algorithm

When trying to build a signed APK in Unity 3.5.0.b6 i get this error:

Error building Player: UnityException: APK Signing Failed!
Unable to determine signature algorithm. See the Console for details.

There are no more details in the console :frowning:

Anyone know whats going on?

The way I fixed this problem is that I uninstalled everything regarding Java on my computer including the removal of all the java related environment variables. Then reinstalled the latest JDK below 7, so 6.xx.

Fixed this problem and more.

Same problem, anyone solved it?
Thanks

Same problem here.
The project just works fine in Unity 3.4 but the problem existed after I updated to Unity 3.5.0f2
I tried downgrade JDK to 1.6, reseting the paths, generating the keystore file manually instead of in Unity. But still no luck.
Anyone gets an idea?
My Debug console shows the following:

UnityEngine.Debug:LogError(Object)
PostProcessAndroidPlayer:GetSigAlgo()
PostProcessAndroidPlayer:SignAndroidPackage(String)
PostProcessAndroidPlayer:PostProcess(BuildTarget, String, String, String, String, String, String, BuildOptions)
UnityEditor.HostView:OnGUI()

Thanks

I have the same problem with Unity 3.5, anyone solved it? Thanks

I have the same prob, anyone? Thanks.

I have the same problem with Unity 3.5, anyone? Thanks.

Same problem here. I tried all suggestions such as resetting/removing the CLASSPATH environment variable, but it makes no difference.

3.5.0f5 same problem, very serious issue that prevents me from working.

Sounds like this problem has been around for a long time. How did people get around it? I just tried to build for Android for the first time and get this problem when trying to copy the APK as well even on different projects. Hopefully, somebody can help now.

Hey Guys, Make sure your KeyStore is set up in Build Settings > Player Settings > Publishing Settings, and that your Keystore Password for both the Keystore itself, and the Key Alias is correct.

That has in the past solved this problem for me. Hopefully it does the same for you guys.

Nothing since March 31? I’m having this problem now. Did everyone else figure it out?

apk signing errors usually have to do with your Java environment. Check your JDK and your environment variables (like PATH, JAVA_HOME, CLASSPATH).

Export your assets, create a new project, import your assets back then build, it will work

Perhaps the problem with password, maybe they are different. Check pass under key and pass under allias, change language.

I had the same problem and here is how I do it. My Unity is 3.4 and Java JDK 7.45.

private key
You must generate one using Keytool located in Java bin folder. In my case C:\Program Files\Java\jdk1.7.0_51\bin.
JSE is not enough, download JDK from Java web site.

Run → cmd, navigate Command prompt to our JDK\bin folder (cd C:\Program Files\Java\jdk1.7.0_51\bin) and type:

keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000

in my case:

keytool -genkey -v -keystore stnicholas.keystore -alias stnicholas -keyalg RSA -keysize 2048 -validity 10000

Running the command above, Keytool prompts you to provide passwords and other data. It then generates the keystore as a file called my-release-key.keystore, stnicholas.keystore in my case.

compile the application
In order to release your application to users, you must compile it in release mode. In release mode, the compiled application is not signed by default and you will need to sign it with your private key from above.
From Unity:

21306-signing1.jpg

Use your private key and leave application Unsigned.

modify .apk file
Rename your .apk file to .zip or open it with 7zip or similar software.
Remove META-INF folder, make other changes you need, for example place drawable-xhdpi,hdpi,mdpi,ldpi in res folder. Rename it back to .apk if Zip is used.

Signing
Use Jarsigner tool located in Java bin folder. In my case C:\Program Files\Java\jdk1.7.0_51\bin
Place your .keystore and .apk file to folder.

Run → cmd, navigate Command prompt to our JDK\bin folder and type:

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore my_application.apk alias_name

in my case:

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore stnicholas.keystore StNicholas.apk stnicholas

Jarsigner prompts you to provide passwords, it then modifies the .apk, meaning the APK is now signed.
To verify that your APK is signed, type this:

jarsigner -verify my_application.apk

If the package is signed properly, Jarsigner prints “jar verified”.

align .apk
Run zipalign on signed application package. This tool is provided with the Android SDK, inside the tools/ directory. In my case C:\adt-bundle-windows-x86\sdk ools.
Zipalign provides a performance optimization for Android system.
Place your .apk file to folder sdk ools and rename it. In my case from StNicholas.apk to StNicholas2.apk

Run → cmd, navigate Command prompt to our tools folder and type:

zipalign -v 4 your_project_name-unaligned.apk your_project_name.apk

in my case:

zipalign -v 4 StNicholas2.apk StNicholas.apk

That’s it. your_project_name.apk, or in my case StNicholas.apk, is your signed Android application.