Log in or register to post comments

Unable to convert classes into dex format

September 10, 2016 - 12:36pm #1

I create a new project, I imported Vurofia 1.44, I created a simple scene I tried to export to Android and error "Unable to convert classes into dex format", what happend?. I read a few forum and anyone help me. Please help.

 

CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details.

/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java -Xmx2048M -Dcom.android.sdkmanager.toolsdir="/Users/mianel/Library/Android/sdk/tools" -Dfile.encoding=UTF8 -jar "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar" -

stderr[

Exception in thread "main" java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : 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:358)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:274)

at SDKMain.main(SDKMain.java:127)

]

stdout[

]

UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)

UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)

UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)

UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

AttachmentSize
Image icon Screenshot 2016-09-10 14.53.07.png42.49 KB

Unable to convert classes into dex format

January 10, 2019 - 1:37am #2

I am using Unity 2018.2.0.0f2 with Vuforia 6-2-10 and JDK1.8.0_77 and nothing else. I have also tried changing the sdk and jdk paths still the error won't go. I have also tried deleting the duplicate files but it just seems too many of them moreover I can only find duplicate .dll files and not (.arr) and (.jar) files. I have also tried reinstalling the android and iOS support from the Unity Download Assistant but still I am getting the same error. Here's the error log:

CommandInvokationFailure: Unable to convert classes into dex format.

C:/NVPACK/jdk1.8.0_77\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/NVPACK/android-sdk-windows\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -

stderr[

Error:Invalid command dx

]

stdout[

]

exit code: 64

UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)

UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)

UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)

UnityEditor.Android.AndroidSDKTools.RunCommand (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg, Int32 memoryMB)

UnityEngine.GUIUtility: ProcessEvent(Int32, IntPtr)

Please tell me what can I do to get rid of this error.

Log in or register to post comments