- Home /
I am getting an error "Gradle failed to fetch dependencies" for Google admob plugin
I am getting this error when integrating Google Admob Plugin when try to force resolve from Android Resolver.
Gradle failed to fetch dependencies.
Failed to run 'C:\Users\mouhammad\Desktop\My games!\CashCapitalist\Temp\PlayServicesResolverGradle\gradlew.bat -b "C:\Users\mouhammad\Desktop\My games!\CashCapitalist\Temp\PlayServicesResolverGradle\PlayServicesResolver.scripts.download_artifacts.gradle" --no-daemon "-PANDROID_HOME=C:/Users/mouhammad/AppData/Local/Android/Sdk" "-PTARGET_DIR=C:\Users\mouhammad\Desktop\My games!\CashCapitalist\Assets\Plugins\Android" "-PMAVEN_REPOS=https://maven.google.com/" "-PPACKAGES_TO_COPY=com.google.android.gms:play-services-ads:15.0.1"' stdout:
stderr: Exception in thread "main" java.lang.RuntimeException: Could not determine wrapper version. at org.gradle.wrapper.GradleWrapperMain.wrapperVersion(GradleWrapperMain.java:111) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61) Caused by: java.lang.RuntimeException: No build receipt resource found. at org.gradle.wrapper.GradleWrapperMain.wrapperVersion(GradleWrapperMain.java:97) ... 1 more
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()
Answer by LilShah · May 10, 2020 at 01:36 PM
Most likely issue is the Exclamation mark(!) in your path (My Games!). That apparently messes up many java based things.
Answer by bhautik74jikadra · Feb 23, 2021 at 12:07 PM
Delete all Google AdS files from the Asset Name folder and re-import the Google AdS package.
Or
-Right click on "my computer" and go to properties.
-Go to the Advanced tab
-Click on the Environmental Variables button
-Find the JAVA_HOME variable under System Variables
-Change the value to wherever this file actually exists for you. (for me it was C:\Program Files\Java\jdk-10)
-Restart Unity
Your answer
Follow this Question
Related Questions
Ads shows in the editor but not in the Game? please help. 0 Answers
Intersititial ads stops the game 0 Answers
Admob crashes game on initialize (IOS) 0 Answers
Admob rewarded videos not rewarding 1 Answer