Build fails in unity using googlevr sdk, unable to convert classes into dex

315 views Asked by At

I'm trying to build for daydream using the google-vr sdk, but am getting build errors in unity. If I remove the plugins/android directory I am able to build but the build comes out buggy as hell. I am then prompted to install missing dependencies: Import for GVRBackwardsCompatibility

After doing so am unable to build again, with unable to convert classes into dex format error. Console shows this:

 CommandInvokationFailure: Unable to convert classes into dex format.
C:/Program Files/Java/jdk1.8.0_112\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="F:/Android/android-sdk\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity 5.6.0b1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -

stderr[
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/common/logging/nano/Vr;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/common/logging/nano/Vr$VREvent;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/common/logging/nano/Vr$VREvent$Application;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/common/logging/nano/Vr$VREvent$AudioStats;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/common/logging/nano/Vr$VREvent$AudioStats$RenderingMode;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/common/logging/nano/Vr$VREvent$Bucket;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/common/logging/nano/Vr$VREvent$Cyclops;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/common/logging/nano/Vr$VREvent$Cyclops$Capture;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/common/logging/nano/Vr$VREvent$Cyclops$Capture$Outcome;

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Translation has been interrupted
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:613)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
    at com.android.dx.command.dexer.Main.run(Main.java:277)
    at com.android.dx.command.dexer.Main.main(Main.java:245)
    at com.android.dx.command.Main.main(Main.java:106)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at SDKMain.main(SDKMain.java:129)
Caused by: java.lang.InterruptedException: Too many errors
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:605)
    ... 9 more
]
stdout[
processing archive P:\_Unity\DayDreamv1\Temp\StagingArea\android-libraries\gvr-permissionsupport-release\libs\.\classes.jar...
processing com/google/gvr/permissionsupport/BuildConfig.class...
processing com/google/gvr/permissionsupport/PermissionsFragment.class...
processing com/google/gvr/permissionsupport/PermissionsFragment$1.class...
processing com/google/gvr/permissionsupport/PermissionsFragment$PermissionsCallback.class...
processing com/google/gvr/permissionsupport/TransitionVRActivity.class...
processing com/google/gvr/permissionsupport/TransitionVRActivity$1.class...
ignored resource P:\_Unity\DayDreamv1\Temp\StagingArea\android-libraries\gvr\libs\.\armeabi-v7a\libgvr.so
processing archive P:\_Unity\DayDreamv1\Temp\StagingArea\android-libraries\gvr\libs\.\classes.jar...
processing com/google/common/logging/nano/Vr.class...

Unity 5.6.0b1 // Google VR SDK 1.10 // win10 x64

Have tried changing manifest.xml in plugins/android to reflect target-sdk and tried changing same in unity editor

Any help much appreciated.

1

There are 1 answers

0
zhekazheka On BEST ANSWER

it looks like you have a duplicates in a project. Please, check if you did not add the same library twice or something like that. As error stands issue in duplication in this

/google/common/logging/nano