Unity 2019.3 作业失败,出现异常:GooglePlayServices.JavaUtilities+ToolNotFoundException:找不到 jar

问题描述 投票:0回答:4

我正在尝试构建我的 Unity 项目,我通过协作系统与另一位开发人员合作。他们没有任何问题,并且我们使用完全相同的项目版本,但是,每次打开项目时我都会收到此错误,并且无法找到修复程序。我尝试过重新安装 Unity 并稍微调整一下 JDK/SDK 选项,但无法产生任何影响。

我很确定这是 Google Play 服务插件的问题,而且我不确定我是否已成功通过 Firebase 删除了一些依赖项。

这是错误:

Job failed with exception: GooglePlayServices.JavaUtilities+ToolNotFoundException: jar not found.
  at GooglePlayServices.PlayServicesResolver.ExtractZip (System.String zipFile, System.Collections.Generic.IEnumerable
1[T] extractFilenames,System.String outputDirectory,System.Boolean update) [0x00132] in Z: mp mp.ab7x7pd8vv hird_party\unity\unity_jar_resolver\source\PlayServicesResolver\src\PlayServicesResolver.cs: 2437 在 Google.GradleWrapper.Extract (Google.Logger 记录器) [0x00000] 在 Z: mp mp.ab7x7pd8vv hird_party\unity\unity_jar_resolver\source\PlayServicesResolver\src\GradleWrapper.cs:100 在 GooglePlayServices.GradleResolver.GradleResolution (System.String destinationDirectory、System.String androidSdkPath、System.Boolean logErrorOnMissingArtifacts、System.Boolean closeWindowOnCompletion、System.Action
1[T] resolutionComplete) [0x00093] in Z:\tmp\tmp.ab7x7pd8vv\third_party\unity\unity_jar_resolver\source\PlayServicesResolver\src\GradleResolver.cs:267 
  at GooglePlayServices.GradleResolver.DoResolutionUnsafe (System.String destinationDirectory, System.Boolean closeWindowOnCompletion, System.Action resolutionComplete) [0x000bc] in Z:\tmp\tmp.ab7x7pd8vv\third_party\unity\unity_jar_resolver\source\PlayServicesResolver\src\GradleResolver.cs:820 
  at GooglePlayServices.GradleResolver+<DoResolution>c__AnonStorey5.<>m__0 () [0x00000] in Z:\tmp\tmp.ab7x7pd8vv\third_party\unity\unity_jar_resolver\source\PlayServicesResolver\src\GradleResolver.cs:710 
  at Google.RunOnMainThread.ExecuteNext () [0x0003d] in Z:\tmp\tmp.c5cHAkrYVv\third_party\unity\unity_jar_resolver\source\VersionHandlerImpl\src\RunOnMainThread.cs:377 
UnityEngine.Debug:LogError(Object)
Google.RunOnMainThread:ExecuteNext() (at Z:/tmp/tmp.c5cHAkrYVv/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:379)
Google.RunOnMainThread:<ExecuteAll>m__1() (at Z:/tmp/tmp.c5cHAkrYVv/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:408)
Google.RunOnMainThread:RunAction(Action) (at Z:/tmp/tmp.c5cHAkrYVv/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:234)
Google.RunOnMainThread:ExecuteAll() (at Z:/tmp/tmp.c5cHAkrYVv/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:406)
Google.RunOnMainThread:Run(Action, Boolean) (at Z:/tmp/tmp.c5cHAkrYVv/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:363)
GooglePlayServices.GradleResolver:DoResolution(String, Boolean, Action) (at Z:/tmp/tmp.ab7x7pd8vv/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/GradleResolver.cs:709)
GooglePlayServices.PlayServicesResolver:ResolveUnsafe(Action
1、Boolean、Boolean、Boolean)(位于 Z:/tmp/tmp. ab7x7pd8vv/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1786) GooglePlayServices.c__AnonStorey5:<>m__0() (位于 Z:/tmp/tmp.ab7x7pd8vv/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1604) GooglePlayServices.PlayServicesResolver:ExecuteNextResolveJob()(位于 Z:/tmp/tmp.ab7x7pd8vv/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1461) GooglePlayServices.PlayServicesResolver:ScheduleResolve(布尔值,布尔值,操作
1, Boolean) (at Z:/tmp/tmp.ab7x7pd8vv/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1617)
GooglePlayServices.PlayServicesResolver:AutoResolve(Action) (at Z:/tmp/tmp.ab7x7pd8vv/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1134)
GooglePlayServices.PlayServicesResolver:<ScheduleAutoResolve>m__8() (at Z:/tmp/tmp.ab7x7pd8vv/third_party/unity/unity_jar_resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1113)
Google.RunOnMainThread:ExecutePollingJobs() (at Z:/tmp/tmp.c5cHAkrYVv/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:300)
Google.RunOnMainThread:<ExecuteAll>m__1() (at Z:/tmp/tmp.c5cHAkrYVv/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:414)
Google.RunOnMainThread:RunAction(Action) (at Z:/tmp/tmp.c5cHAkrYVv/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:234)
Google.RunOnMainThread:ExecuteAll() (at Z:/tmp/tmp.c5cHAkrYVv/third_party/unity/unity_jar_resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:406)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

此外,我的设备上没有 Z 驱动器。

谢谢

android unity-game-engine sdk google-play-services google-play-games
4个回答
3
投票

就像Anton R上面说的,我也做了以下!

这就是我修复它的方法:

打开首选项/外部工具/

然后取消选中并再次选中“Android”下的所有复选标记

Android 解析器将在进入播放模式后启动并自动解决所有问题。

但随后出现了 win32Exception 错误,gradlewbawt 文件未找到。 要修复它,请打开此链接: https://raw.githubusercontent.com/googlesamples/unity-jar-resolver/master/gradlew.bat

并下载 gradlew.bat 文件,然后将其放入您的: C:\Users\STEPHEN\Game1\Temp\PlayServicesResolverGradle\ 路径。这是我的,你的会有所不同。 确保将文件另存为 gradlew.bat。


2
投票

花了很长时间试图解决这个问题,然后决定发布这个请求,我设法解决了它。

不是 100% 确定我是如何做到的,但是当我切换到不同的场景并尝试进入播放模式时,“Android Dependency Resolver”打开并扫描问题,发现一些问题然后修复它们。

希望这足以帮助任何遇到类似问题的人!


0
投票

这就是我修复它的方法:

打开首选项/外部工具/

然后取消选中并再次选中“Android”下的所有复选标记

Android 解析器将在进入播放模式后启动并自动解决所有问题。


0
投票

检查您的ExternalDependencyManager/Editor文件夹。

如果您有两个版本的 EDM,则只需删除旧版本文件夹即可。 版本文件夹名称示例如下所示 (1.2.178)

© www.soinside.com 2019 - 2024. All rights reserved.