- Home /
Android - Failed to sign APK package: Unsupported major.minor version 52.0 {SOLVED}
I am trying to build my apk in Unity (2017.3.0f3) but I get the error Unsupported major.minor version 52.0. I have read elsewhere that to fix this download Java JDK 8 and select the path. I have done this with different version of Java 8 and none of them are working. I have tried updating all my android SDK packages but Unity wont build on the latest SDK tools so I had to replace them with the Revision 25.2.5 (January 2017) tools as specified in the following unity answers page:
https://answers.unity.com/questions/1323731/unable-to-list-target-platforms-please-make-sure-t.html
I am at a loss now, any advice is appreciated. Thanks
Current settings:
Error log:
CommandInvokationFailure: Failed to sign APK package.
C:\Users\Jack\AppData\Local\Android\Sdk\build-tools\27.0.3\apksigner.bat sign --ks "E:/JRFApplications/Keystore/jrfapplications_2018.keystore" --ks-pass stdin --ks-key-alias "eggscapade" --key-pass stdin "E:\JRFApplications\Apps\Egg\Temp/StagingArea/Package.apk"
stderr[
java.lang.UnsupportedClassVersionError: com/android/apksigner/ApkSignerTool : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:412)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
Exception in thread "main"
]
stdout[
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.Command.RunWithStdin (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg, System.String[] input)
UnityEditor.Android.PostProcessor.Tasks.TasksCommon.Exec (System.String command, System.String args, System.String workingdir, System.String errorMsg, System.String[] stdin)
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)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Versions of JDK installed and tested without success:
Answer by Grish_tad · Feb 05, 2018 at 05:40 PM
Under Publishing Settings, try changing the Build System to Gradle instead of Internal
Your answer
Follow this Question
Related Questions
Error when trying to make a signed build in Unity3D 0 Answers
Unity will not accept JDK 1 Answer
Unable to install APK! 11 Answers
Java error when building 1 Answer
CommandInvokationFailure: Failed to align APK package. 3 Answers