Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by Polygami · Apr 21, 2016 at 09:34 PM · androiderrorvrgoogle

Unable to convert classes into dex format. Using only Google Cardboard in Unity (Mac)

Hi guys,

Normally I wouldn't post but I have literally run out of ideas. I have been searching through the forums trying to find a solution to an error I am repeatedly getting.

"Build failure Unable to convert classes into dex format. See the Console for details."

This always happens when trying to build and run at the "Converting java.class to dex-format…" stage.

I am trying to get the Google Cardboard SDK for Unity working on Android. I am using Unity 5.3.4fi Personal on OS X Yosemite 10.10.5. I have gone through many threads and forums trying to work out what the problem might be. From what I can decipher, this error is usually caused by duplicate .jar files and often linked to using multiple plugins. The strange thing is that I am using a completely blank project, importing the Google Cardboard Unity SDK, adding the Cardboard prefab to the stage and then attempting a build. I have also searched for .jar files in finder and there are no duplicate .jar filenames other than the ones in the Temp folder.

I have also tried removing the Cardboard folders and assets and using the Durovis Dive SDK instead. I get the same issue.

I have made VR apps before in Unity 4.6 and never had these issues, so I have no idea what is going on. I literally won't be able to make any VR games unless I can get this stupid issue fixed.

If anyone has nay suggestions or similar experiences, it would be a massive help and you would be preventing premature hair loss.

If you need further information, please ask.

Many thanks.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
â–¼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

5 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Polygami · Apr 22, 2016 at 11:09 AM

Ok, so I have manage to sort it out now. I completely removed Android Studio and ALL versions of Java and JDK and then reinstalled them. Through the process, there are a few things that I noticed, which may have been the reason for the errors, however I don't know for certain...

First of all I had more than 3 versions of JDK on my Mac. Secondly, when I installed Android Studio I copied it over a previous version and wasn't greeted with the setup wizard when I opened it for the first time. This then meant that I had to add the platform and tools manually in Android Studio, which may or may not have been the issue.

What I did

You might want to grab a coffee for this as there a few websites to read and re-installing Android Studio takes a while.

  1. Completely removed Android Studio in Terminal as shown here: http://stackoverflow.com/questions/17625622/how-to-completely-uninstall-android-studio

  2. Completely removed Java as outlined here: http://www.howtogeek.com/230145/how-to-uninstall-java-on-mac-os-x/ - This is the point where I noticed that there were several versions of JDK. When checking the contents of the "JavaVirtualMachines" folder there were 2 files listed. I followed the steps to delete them, but simply pressing tab won't work because there are 2 files starting with "jdk1", so just type a bit more of the file name, then press Tab. The last point of the guide says to type "java" in Terminal to make sure it has completely gone. I noticed that there was a 1.6.0 version of JDK, which after a quick Google search turned out to be in another folder. So I typed in terminal "cd /System/Library/Java/JavaVirtualMachines/" to get to the folder, then "ls" to list its contents, then "sudo rm -rf 1.6.0.jdk/" to delete the remaining version. I then typed "java" again to confirm that everything was gone.

  3. I re-installed JDK from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

  4. I re-installed Android Studio from http://developer.android.com/sdk/index.html#Other - This time I was met with the setup wizard and followed the recommended settings.

  5. I set up an entirely new Unity project, adjusted the player settings to have a proper bundle identifier etc. then installed the Unity Cardboard SDK from https://developers.google.com/cardboard/unity/download and added the Cardboard Main prefab to the scene.

  6. I plugged in my phone, went to build and it asked me to locate the JDK location and then said it needed to update the Android SDK, which it did and then finally I had the content working on my device.

Hope this solves the issue for you and hopefully the next time someone encounters the issue they will be able to see this solution and not have to bang their head against a wall like I have for the past few days.

Let me know if it works for you and if you have any insight into the route of the problem, it would also be useful for future reference.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
â–¼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Qaim Hassan · Apr 22, 2016 at 05:25 AM

I'm encountering the same problem. The only tweak i came across with is if i delete plugins folder from cardboard SDK and uncheck virtual Reality in build Setting i can compile it but for the cost of just solid color view. I'm using controller for movements and when i use the controller i can hear movements etc. but no visuals. So, there must be something wrong with either googleCardboard VR settings or unity VR settings but i still can't figure this out maybe you can have any luck finding the problem and if you find one kindly post it here too.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
â–¼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Polygami · Apr 22, 2016 at 08:17 AM

Yes of course. I am still searching but can't seem to solve it. I might have to try completely reinstalling Unity, Android and JSK as a last resort. I am running out of ideas.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
â–¼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Polygami · Apr 22, 2016 at 11:09 AM

Ok, so I have manage to sort it out now. I completely removed Android Studio and ALL versions of Java and JDK and then reinstalled them. Through the process, there are a few things that I noticed, which may have been the reason for the errors, however I don't know for certain...

First of all I had more than 3 versions of JDK on my Mac. Secondly, when I installed Android Studio I copied it over a previous version and wasn't greeted with the setup wizard when I opened it for the first time. This then meant that I had to add the platform and tools manually in Android Studio, which may or may not have been the issue.

What I did

You might want to grab a coffee for this as there a few websites to read and re-installing Android Studio takes a while.

  1. Completely removed Android Studio in Terminal as shown here: http://stackoverflow.com/questions/17625622/how-to-completely-uninstall-android-studio

  2. Completely removed Java as outlined here: http://www.howtogeek.com/230145/how-to-uninstall-java-on-mac-os-x/ - This is the point where I noticed that there were several versions of JDK. When checking the contents of the "JavaVirtualMachines" folder there were 2 files listed. I followed the steps to delete them, but simply pressing tab won't work because there are 2 files starting with "jdk1", so just type a bit more of the file name, then press Tab. The last point of the guide says to type "java" in Terminal to make sure it has completely gone. I noticed that there was a 1.6.0 version of JDK, which after a quick Google search turned out to be in another folder. So I typed in terminal "cd /System/Library/Java/JavaVirtualMachines/" to get to the folder, then "ls" to list its contents, then "sudo rm -rf 1.6.0.jdk/" to delete the remaining version. I then typed "java" again to confirm that everything was gone.

  3. I re-installed JDK from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

  4. I re-installed Android Studio from http://developer.android.com/sdk/index.html#Other - This time I was met with the setup wizard and followed the recommended settings.

  5. I set up an entirely new Unity project, adjusted the player settings to have a proper bundle identifier etc. then installed the Unity Cardboard SDK from https://developers.google.com/cardboard/unity/download and added the Cardboard Main prefab to the scene.

  6. I plugged in my phone, went to build and it asked me to locate the JDK location and then said it needed to update the Android SDK, which it did and then finally I had the content working on my device.

Hope this solves the issue for you and hopefully the next time someone encounters the issue they will be able to see this solution and not have to bang their head against a wall like I have for the past few days.

Let me know if it works for you and if you have any insight into the route of the problem, it would also be useful for future reference.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
â–¼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Qaim Hassan · Apr 22, 2016 at 01:08 PM 0
Share

Thanks mate for your solutions. When you mentioned that you had multiple JD$$anonymous$$s, something clicked in my $$anonymous$$d, as when i was checking the error description in console it was related with some "Virtual$$anonymous$$achine/jdk... "

so, Here what I did!

  1. I followed the instructions from your provided link to uninstall jdk (http://www.howtogeek.com/230145/how-to-uninstall-java-on-mac-os-x/) the older versions of JD$$anonymous$$ and re-installing it (http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html).

  2. Then i set up jdk in External Tools in unity>preferences>External Tools i.e "/Library/Java/JavaVirtual$$anonymous$$achines/jdk1.8.0_92.jdk/Contents/Home" for me

  3. Tried out with the same project, It processed through dex conversion but gave me an error for installing apk on device

  4. Created a new project set up basic scene and built the new project and 'Voila' it ran normally on my device.

  • So, the problem was with multiple versions of jdk conflicting with each other.

  • $$anonymous$$aybe you can work it out with deleting older versions of jdk ins$$anonymous$$d of completely installing and re-installing it and set up home path for jdk manually in unity. *** Hope this solution might save some of your time for re-installing Android Studio

avatar image
0

Answer by domuzx · Nov 04, 2016 at 02:56 AM

i have the same problem, but now it working because i try to update my JDK1.7.0_79 to new JDK1.8.0_112 and now problem solve....! i'm using windows 64 bit with unity 5.4.0f3..

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
â–¼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

89 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unable to build Google VR app for Android 0 Answers

Google VR (Cardboard) don't work with Render Pipeline Asset. 0 Answers

Android Unable to merge android manifest Error 0 Answers

Overwrote cardboard package now screen is black. Help appreciated a lot! 0 Answers

Android application doesn't automaticly request for microphone permission 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges