使用 googlevr sdk 统一构建失败,无法将 类 转换为 dex
Build fails in unity using googlevr sdk, unable to convert classes into dex
我正在尝试使用 google-vr sdk 为 daydream 构建,但在 unity 中出现构建错误。
如果我删除 plugins/android 目录,我可以构建,但构建出来的时候会出现问题。然后系统提示我安装缺少的依赖项:
Import for GVRBackwardsCompatibility
这样做后无法再次构建,无法将类转换为dex格式错误。
控制台显示:
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.class...
processing com/google/gvr/permissionsupport/PermissionsFragment$PermissionsCallback.class...
processing com/google/gvr/permissionsupport/TransitionVRActivity.class...
processing com/google/gvr/permissionsupport/TransitionVRActivity.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
已尝试在 plugins/android 中更改 manifest.xml 以反映 target-sdk 并尝试在 unity 编辑器中进行更改
非常感谢任何帮助。
您的项目中似乎有重复项。请检查您是否没有两次添加相同的库或类似的东西。由于此
中的重复存在错误问题
/google/common/logging/nano
我正在尝试使用 google-vr sdk 为 daydream 构建,但在 unity 中出现构建错误。 如果我删除 plugins/android 目录,我可以构建,但构建出来的时候会出现问题。然后系统提示我安装缺少的依赖项: Import for GVRBackwardsCompatibility
这样做后无法再次构建,无法将类转换为dex格式错误。 控制台显示:
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.class...
processing com/google/gvr/permissionsupport/PermissionsFragment$PermissionsCallback.class...
processing com/google/gvr/permissionsupport/TransitionVRActivity.class...
processing com/google/gvr/permissionsupport/TransitionVRActivity.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
已尝试在 plugins/android 中更改 manifest.xml 以反映 target-sdk 并尝试在 unity 编辑器中进行更改
非常感谢任何帮助。
您的项目中似乎有重复项。请检查您是否没有两次添加相同的库或类似的东西。由于此
中的重复存在错误问题/google/common/logging/nano