安装FirebaseAuth.unitypackage时出错,Gradle无法获取依赖项

时间:2017-09-21 17:25:29

标签: android firebase unity3d firebase-authentication

我将google json安装到我的项目和FirebaseAuth.unitypackage中。在添加Firebase.Auth.unitypackage时,控制台显示" Gradle无法获取依赖关系"。我将播放服务解析器更新为1.2.50.00,删除前一个并将新的一个导入到我的项目中,因为另一个帖子说但没有修复。我还尝试过/ Assets / PlayServicesResolver / Resolve和Force resolve。

控制台记录:

Gradle failed to fetch dependencies.

Failed to run 'Temp\PlayServicesResolverGradle\gradlew.bat -b Temp\PlayServicesResolverGradle\PlayServicesResolver.scripts.download_artifacts.gradle "-PANDROID_HOME=C:/Users/Augmented Marketing/Downloads/android-sdk_r24.4.1-windows/android-sdk-windows" "-PTARGET_DIR=C:\Users\Augmented Marketing\Documents\Unity firebase test\Assets\Plugins\Android" "-PMAVEN_REPOS=file:///C:/Users/Augmented Marketing/Documents/Unity firebase test/Assets/Firebase/m2repository" "-PPACKAGES_TO_COPY=com.google.android.gms:play-services-base:11.2.0;com.google.firebase:firebase-common:11.2.0;com.google.firebase:firebase-core:11.2.0;com.google.firebase:firebase-app-unity:4.1.0;com.google.firebase:firebase-auth:11.2.0;com.google.firebase:firebase-auth-unity:4.1.0"'
stdout:

BUILD FAILED

Total time: 1.315 secs

stderr:

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\Augmented Marketing\Documents\Unity firebase test\Temp\PlayServicesResolverGradle\PlayServicesResolver.scripts.download_artifacts.gradle' line: 129

* What went wrong:
A problem occurred evaluating root project 'PlayServicesResolverGradle'.
> Illegal character in path at index 26: file:///C:/Users/Augmented Marketing/Documents/Unity firebase test/Assets/Firebase/m2repository

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

exit code: 1

UnityEngine.Debug:LogError(Object)
GooglePlayServices.PlayServicesResolver:<PlayServicesResolver>m__0(String, LogLevel)
Google.JarResolver.PlayServicesSupport:Log(String, LogLevel, Boolean)
GooglePlayServices.<GradleResolution>c__AnonStorey0:<>m__0(Result)
GooglePlayServices.<GradleResolution>c__AnonStorey1:<>m__0()
GooglePlayServices.PlayServicesResolver:PumpUpdateQueue()
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

2 个答案:

答案 0 :(得分:2)

您可以尝试在Unityfirebasetest中更改文件夹名称Unity firebase test而不是AugmentedMarketingAugmented Marketing而不是C:\Users\Augmented Marketing\Documents\Unity firebase test吗? 所以,删除空白。

答案 1 :(得分:0)

我认为问题是项目路径中的空白。我们已在Firebase SDK https://firebase.google.com/support/release-notes/unity#4.2.0的4.2.0版本和Play服务解析器的https://github.com/googlesamples/unity-jar-resolver/commit/bf515eb2080ee9713584684521d36ad7e8d62fbd中修复此问题。

干杯, 斯图尔特