Log in or register to post comments

Unable to convert classes into dex format-- Fresh install

July 29, 2016 - 7:02am #1

After working on a Vuforia/Unity project with Unity for a few months, across a few computers, I have started getting the error "Unable to convert classes into dex format" when I build to Android.  This issue has been raised in other threads, but the answers don't seem applicable here.  

I have tried creating a new Unity project, and downloaded and installed a new copy of the Vuforia package.  In a blank scene, in a project with nothing in it but the Vuforia package, I still get this error when I try to build to Android.  

I've found that if I remove both Vuforia.jar and VuforiaUnityPlayer.jar from the project, it will build.  However, the camera functionality wont work, which renders the app useless.

There are two errors logged, here are the contents.  I've x'd out my computer name.

Any help would be greatly appreciated.  

 

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

C:/Program Files/Java/jdk1.7.0_79\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Users/xxxxxxx/AppData/Local/Android/Sdk\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files (x86)\Unity\Editor\Data\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.HostView:OnGUI()

 

_________________________________________

second error:

 

Error building Player: CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details.
C:/Program Files/Java/jdk1.7.0_79\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Users/xxxxxxxx-CORP/AppData/Local/Android/Sdk\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files (x86)\Unity\Editor\Data\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[

]

 

 

 

Unable to convert classes into dex format-- Fresh install

August 8, 2016 - 11:42pm #4

<p>Have you solved the problem?i meet the same situation!</p><p>&nbsp;</p>

Unable to convert classes into dex format-- Fresh install

August 1, 2016 - 3:45am #3

I had the same problem.  I installed the latest JDK 32bit version and then from "unity preferences" -> "External tools" updated the JDK path. (It was still referencing to the old versions folder. Now everything seems to be working. 

 

Unable to convert classes into dex format-- Fresh install

July 29, 2016 - 11:00pm #2

Hello,You solve it?I also encountered the same situation。

Log in or register to post comments