Gradle failed to fetch dependencies?
After adding in Google AdMob to my project my game build was crashing when i tried to run it on my android. I tried to force resolve to fix it but when I try the bar just freezes and gives me this air.
Gradle failed to fetch dependencies.
Failed to run 'C:\Users\Lenovo\GameMaking\UnityStuff\UnityProjects\Flying & Dying\Temp\PlayServicesResolverGradle\gradlew.bat -b "C:\Users\Lenovo\GameMaking\UnityStuff\UnityProjects\Flying & Dying\Temp\PlayServicesResolverGradle\PlayServicesResolver.scripts.download_artifacts.gradle" --no-daemon "-PANDROID_HOME=C:/Users/Lenovo/AppData/Local/Android/Sdk" "-PTARGET_DIR=C:\Users\Lenovo\GameMaking\UnityStuff\UnityProjects\Flying & Dying\Assets\Plugins\Android" "-PMAVEN_REPOS=https://maven.google.com/" "-PPACKAGES_TO_COPY=com.google.android.gms:play-services-ads:15.0.1"' stdout:
stderr: 'Dying\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) GooglePlayServices.PlayServicesResolver:Log(String, LogLevel) GooglePlayServices.c_AnonStorey17:<>m27(Result) GooglePlayServices.cAnonStorey19:<>m32() Google.RunOnMainThread:ExecuteNext() Google.RunOnMainThread:m6() Google.RunOnMainThread:RunAction(Action) Google.RunOnMainThread:ExecuteAll() Google.RunOnMainThread:Run(Action, Boolean) GooglePlayServices.cAnonStorey17:<>m28(Result) GooglePlayServices.cAnonStorey17:<>m29(Result) GooglePlayServices.ProgressReporter:SignalComplete() GooglePlayServices.ProgressReporter:CommandLineToolCompletion(Result) GooglePlayServices.cAnonStorey2:<>m3() Google.RunOnMainThread:ExecuteNext() Google.RunOnMainThread:m_6() Google.RunOnMainThread:RunAction(Action) Google.RunOnMainThread:ExecuteAll() UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
Hi Austin, We're having the same problem after adding Ad$$anonymous$$ob: Gradle failed to fetch dependencies. ... stderr: 'App\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.GradleWrapper$$anonymous$$ain
Did you have any luck fixing this? Been through chat about corrupted gradle etc. ... have now removed and re-installed sdks etc but still get same problem. Cheers, Stuart
Answer by ayemaman · Aug 13, 2020 at 09:43 AM
A little late, but... Remove the "&" from your folder name "Flying & Dying". Had the same error just now, searched all over the web and couldn't believe how simple the fix was :D
Your answer
Follow this Question
Related Questions
Google Mobile Ads cause Failed to build apk error 0 Answers
Error, platform-specific implementation not set // AdColony Unity 0 Answers
Admob interstitial is not working as it keeps conflicting with the leader board and google play 0 Answers
Android Build freezes on startup 0 Answers
Admob unity 2017.3 compile error 0 Answers