- Home /
New Android project not building if not signed.
I'm using Unity 2017.3.1p3.
Not able to build without signing the game. If i try with debug key i get: Gradle
CommandInvokationFailure: Gradle build failed.
/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/bin/java -classpath "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-4.0.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx2048m" "assembleRelease"
stderr[
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':packageRelease'.
> java.io.IOException: Failed to digitally sign signature file.
and internal:
CommandInvokationFailure: Failed to build apk.
/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/bin/java -Xmx2048M -Dcom.android.sdkmanager.toolsdir="/Users/joe/Library/Android/sdk/tools" -Dfile.encoding=UTF8 -jar "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar" -
stderr[
Error: Failed to seal APK
]
Signing the app with a keystore will allow me to build no issues. Is there anything i can do to my android sdk?
Thanks
You might need to "browse" for another keystore and select nothing to remove the previous setup keystore ?
Answer by Eresor · Apr 23, 2019 at 08:29 AM
I'm not 100% sure it's related, but I had similar issue: Could not build with "Development build" flag, similar error. The workaround was to install JDK below 8u91 (I used 8u77)
Your answer
![](https://koobas.hobune.stream/wayback/20220612160530im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Signing an Android application 1 Answer
Using the Android default debug keystone from Windows 1 Answer
How to supply an unsigned Android build? 1 Answer
[Android] I signed my apk using generated keystore but google said it was signed in debug mode 3 Answers
Can Google Play App Signing be used with Unity? (and is it a good idea?) 1 Answer