我正在使用 Unity 2018.3.1f1 JDK jdk1.8.0_201 Google Mobile Ads Unity插件v3.16
当我在一个新的项目中导入Google Mobile Ads时,我遇到一个错误:解决android依赖项时。
错误日志是:
Gradle无法获取依赖项。
Failed to run 'F:\Unity_prac\Pong\OnDevelopment\With Google API\r&d\R&D02\Temp\PlayServicesResolverGradle\gradlew.bat -b "F:\Unity_prac\Pong\OnDevelopment\With Google API\r&d\R&D02\Temp\PlayServicesResolverGradle\PlayServicesResolver.scripts.download_artifacts.gradle" --daemon "-PANDROID_HOME=C:\Users\Sameer\AppData\Local\Android\sdk" "-PTARGET_DIR=F:\Unity_prac\Pong\OnDevelopment\With Google API\r&d\R&D02\Assets\Plugins\Android" "-PMAVEN_REPOS=https://maven.google.com/" "-PPACKAGES_TO_COPY=com.google.android.gms:play-services-ads:17.2.0"'
stdout:
stderr:
The system cannot find the path specified.
'D02\Temp\PlayServicesResolverGradle' is not recognized as an internal or external command,
operable program or batch file.
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
exit code: 1
UnityEngine.Debug:LogError(Object)
Google.Logger:Log(String, LogLevel) (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/VersionHandlerImpl/src/Logger.cs:91)
GooglePlayServices.PlayServicesResolver:Log(String, LogLevel) (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:699)
GooglePlayServices.c__AnonStorey18:<>m__2F(Result) (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:619)
GooglePlayServices.c__AnonStorey1A:<>m__3A() (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:710)
Google.RunOnMainThread:ExecuteNext() (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:363)
Google.RunOnMainThread:m__16() (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:394)
Google.RunOnMainThread:RunAction(Action) (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:234)
Google.RunOnMainThread:ExecuteAll() (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:392)
Google.RunOnMainThread:Run(Action, Boolean) (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:349)
GooglePlayServices.c__AnonStorey18:<>m__30(Result) (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:711)
GooglePlayServices.c__AnonStorey18:<>m__31(Result) (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:762)
GooglePlayServices.ProgressReporter:SignalComplete() (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/PlayServicesResolver/src/CommandLineDialog.cs:116)
GooglePlayServices.ProgressReporter:CommandLineToolCompletion(Result) (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/PlayServicesResolver/src/CommandLineDialog.cs:107)
GooglePlayServices.c__AnonStorey2:<>m__4() (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/PlayServicesResolver/src/CommandLine.cs:136)
Google.RunOnMainThread:ExecuteNext() (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:363)
Google.RunOnMainThread:m__16() (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:394)
Google.RunOnMainThread:RunAction(Action) (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:234)
Google.RunOnMainThread:ExecuteAll() (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:392)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
>
Resolution failed
Failed to fetch the following dependencies:
com.google.android.gms:play-services-ads:17.2.0
UnityEngine.Debug:LogError(Object)
Google.Logger:Log(String, LogLevel) (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/VersionHandlerImpl/src/Logger.cs:91)
GooglePlayServices.PlayServicesResolver:Log(String, LogLevel) (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:699)
GooglePlayServices.ResolverVer1_1:LogMissingDependenciesError(List1) (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:463) GooglePlayServices.<DoResolutionUnsafe>c__AnonStorey1D:<>m__36(List1) (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:1058)
GooglePlayServices.c__AnonStorey18:<>m__2F(Result) (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:623)
GooglePlayServices.c__AnonStorey1A:<>m__3A() (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:710)
Google.RunOnMainThread:ExecuteNext() (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:363)
Google.RunOnMainThread:m__16() (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:394)
Google.RunOnMainThread:RunAction(Action) (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:234)
Google.RunOnMainThread:ExecuteAll() (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:392)
Google.RunOnMainThread:Run(Action, Boolean) (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:349)
GooglePlayServices.c__AnonStorey18:<>m__30(Result) (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:711)
GooglePlayServices.c__AnonStorey18:<>m__31(Result) (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:762)
GooglePlayServices.ProgressReporter:SignalComplete() (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/PlayServicesResolver/src/CommandLineDialog.cs:116)
GooglePlayServices.ProgressReporter:CommandLineToolCompletion(Result) (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/PlayServicesResolver/src/CommandLineDialog.cs:107)
GooglePlayServices.c__AnonStorey2:<>m__4() (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/PlayServicesResolver/src/CommandLine.cs:136)
Google.RunOnMainThread:ExecuteNext() (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:363)
Google.RunOnMainThread:m__16() (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:394)
Google.RunOnMainThread:RunAction(Action) (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:234)
Google.RunOnMainThread:ExecuteAll() (at /usr/local/google/home/cleoschneider/google-play-resolver/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:392)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()