Unity3D如何启用--stacktrace [英] Unity3D how to enable --stacktrace
问题描述
构建gradle时出现此错误.
I'm getting this error when building gradle.
出了什么问题:任务':transformClassesWithJarMergingForRelease'的执行失败.
What went wrong: Execution failed for task ':transformClassesWithJarMergingForRelease'.
com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复项: com/google/android/gms/common/util/VisibleForTesting.class
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/common/util/VisibleForTesting.class
尝试:使用--stacktrace选项运行以获取堆栈跟踪.使用--info或--debug选项运行,以获取更多日志输出.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
如果可以看到哪些模块发生冲突,我将解决此问题.任何帮助表示赞赏!
I will solve this problem if I can see which modules are conflicting. Any help appreciated!
推荐答案
如果打开播放器设置,则会在底部找到记录选项.日志记录选项适用于所有构建目标,它们会影响stacktrace.
If you open up the Player Settings you'll find logging options (on the bottom). The logging options apply to all build targets, they are influencing the stacktrace.
默认设置为仅脚本",仅输出托管堆栈跟踪.如果将其设置为"full",您还将获得本机堆栈跟踪,这可能对您有帮助.
The default setting is Script Only which only outputs the managed stacktrace. If you set it to "full" you'll also get the native stacktrace, which might help in your case.
https://docs.unity3d.com/ScriptReference/StackTraceLogType.html
这篇关于Unity3D如何启用--stacktrace的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!