gpt4 book ai didi

unity-game-engine - Gradle 无法获取依赖项 | Unity3d 中解析失败

转载 作者:行者123 更新时间:2023-12-02 10:56:09 28 4
gpt4 key购买 nike

当我尝试使用 Unity 构建并运行我的游戏时,会发生此错误。我还从 here 导入了 GooglePlayServices/ads并且还有最新的android sdk和jdk-8u144。

这是错误日志:

Gradle failed to fetch dependencies


Failed to run 'Temp\PlayServicesResolverGradle\gradlew.bat -b Temp\PlayServicesResolverGradle\PlayServicesResolver.scripts.download_artifacts. gradle --no-daemon "-PANDROID_HOME=C:/Users/rfkha/AppData/Local/Android/sdk1" "- PTARGET_DIR=C:\Users\rfkha\Documents\Space Shooter\Assets\Plugins\Android" "- PMAVEN_REPOS=https://maven.google.com" "- PPACKAGES_TO_COPY=com.google.android.gms:play-services-ads:11.2.2"'
stdout:

ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.

stderr:

exit code: 1

UnityEngine.Debug:LogError(Object)
GooglePlayServices.PlayServicesResolver:LogDelegate(String, LogLevel)
Google.JarResolver.PlayServicesSupport:Log(String, LogLevel, Boolean)
GooglePlayServices.<GradleResolution>c__AnonStorey14:<>m__20(Result)
GooglePlayServices.<GradleResolution>c__AnonStorey15:<>m__29()
GooglePlayServices.PlayServicesResolver:PumpUpdateQueue()
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

第二个错误:

Resolution failed

Failed to fetch the following dependencies:
com.google.android.gms:play-services-ads:11.2.2


UnityEngine.Debug:LogError(Object)
GooglePlayServices.PlayServicesResolver:LogDelegate(String, LogLevel)
Google.JarResolver.PlayServicesSupport:Log(String, LogLevel, Boolean)
GooglePlayServices.ResolverVer1_1:LogMissingDependenciesError(List`1)
GooglePlayServices.<DoResolutionUnsafe>c__AnonStorey17:<>m__26(List`1)
GooglePlayServices.<GradleResolution>c__AnonStorey14:<>m__20(Result)
GooglePlayServices.<GradleResolution>c__AnonStorey15:<>m__29()
GooglePlayServices.PlayServicesResolver:PumpUpdateQueue()
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

最佳答案

将 JAVA_HOME 添加到我的环境变量中,它是 C:\Program Files\Java\jdk1.8.0_144 它对我有用,也许对你也有用。

关于unity-game-engine - Gradle 无法获取依赖项 | Unity3d 中解析失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46681503/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com