Gradle is failed to fetch dependencies , admob ,in UNITY console , Gradle failed to fetched dependencies

I installed the plugin it work fine in unity … show in console dummy ad loaded and dummy ad showen
but on android device it do nothing then i read the logcat and found it says java.lang.classNotFoundException com.google.android.gms.ads.mobileads and if i try to resolve it from assets->play service resolver → android ->force resolve it then says that “Gradle is failed to fetch dependencies” below is the full error in unity console

Gradle failed to fetch dependencies.
Failed to run ‘I:\unitygames\poorCat-v1\Temp\PlayServicesResolverGradle\gradlew.bat -b “I:\unitygames\poorCat-v1\Temp\PlayServicesResolverGradle\PlayServicesResolver.scripts.download_artifacts.gradle” --no-daemon “-PANDROID_HOME=D:/Program Files (x86)/Android/android-sdk” “-PTARGET_DIR=I:\unitygames\poorCat-v1\Assets\Plugins\Android” “-PMAVEN_REPOS=https://maven.google.com/” “-PPACKAGES_TO_COPY=com.google.android.gms:play-services-games:10+;com.google.android.gms:play-services-nearby:10+;com.google.android.gms:play-services-auth:10+;com.google.android.gms:play-services-ads:12.0.1”’
stdout:
Unzipping C:\Users\Awais.gradle\wrapper\dists\gradle-4.2.1-bin\dajvke9o8kmaxbu0kc5gcgeju\gradle-4.2.1-bin.zip to C:\Users\Awais.gradle\wrapper\dists\gradle-4.2.1-bin\dajvke9o8kmaxbu0kc5gcgeju
stderr:
Exception in thread “main” java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(Unknown Source)
at java.util.zip.ZipFile.(Unknown Source)
at java.util.zip.ZipFile.(Unknown Source)
at org.gradle.wrapper.Install.unzip(Install.java:215)
at org.gradle.wrapper.Install.access$600(Install.java:27)
at org.gradle.wrapper.Install$1.call(Install.java:75)
at org.gradle.wrapper.Install$1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
exit code: 1
UnityEngine.Debug:LogError(Object)
Google.Logger:Log(String, LogLevel)
GooglePlayServices.PlayServicesResolver:Log(String, LogLevel)
GooglePlayServices.c__AnonStorey14:<>m__1F(Result)
GooglePlayServices.c__AnonStorey15:<>m__28()
GooglePlayServices.PlayServicesResolver:PumpUpdateQueue()
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

although if I reslove it using just resolve instead of force resolve ,it says resolution succeeded

,I installed the plugin it work fine in unity … show in console dummy ad loaded and dummy ad showen
but on android device it do nothing

then i read the logcat and found it says
java.lang.classNotFoundException com.google.android.gms.ads.mobileads

and if i try to resolve it from assets->play service resolver → android ->force resolve it then says that “Gradle is failed to fetch dependencies”
below is the full error in unity console

Gradle failed to fetch dependencies.
Failed to run ‘I:\unitygames\poorCat-v1\Temp\PlayServicesResolverGradle\gradlew.bat -b “I:\unitygames\poorCat-v1\Temp\PlayServicesResolverGradle\PlayServicesResolver.scripts.download_artifacts.gradle” --no-daemon “-PANDROID_HOME=D:/Program Files (x86)/Android/android-sdk” “-PTARGET_DIR=I:\unitygames\poorCat-v1\Assets\Plugins\Android” “-PMAVEN_REPOS=https://maven.google.com/” “-PPACKAGES_TO_COPY=com.google.android.gms:play-services-games:10+;com.google.android.gms:play-services-nearby:10+;com.google.android.gms:play-services-auth:10+;com.google.android.gms:play-services-ads:12.0.1”’
stdout:
Unzipping C:\Users\Awais.gradle\wrapper\dists\gradle-4.2.1-bin\dajvke9o8kmaxbu0kc5gcgeju\gradle-4.2.1-bin.zip to C:\Users\Awais.gradle\wrapper\dists\gradle-4.2.1-bin\dajvke9o8kmaxbu0kc5gcgeju
stderr:
Exception in thread “main” java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(Unknown Source)
at java.util.zip.ZipFile.(Unknown Source)
at java.util.zip.ZipFile.(Unknown Source)
at org.gradle.wrapper.Install.unzip(Install.java:215)
at org.gradle.wrapper.Install.access$600(Install.java:27)
at org.gradle.wrapper.Install$1.call(Install.java:75)
at org.gradle.wrapper.Install$1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
exit code: 1
UnityEngine.Debug:LogError(Object)
Google.Logger:Log(String, LogLevel)
GooglePlayServices.PlayServicesResolver:Log(String, LogLevel)
GooglePlayServices.c__AnonStorey14:<>m__1F(Result)
GooglePlayServices.c__AnonStorey15:<>m__28()
GooglePlayServices.PlayServicesResolver:PumpUpdateQueue()
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

although if I reslove it using just resolve instead of force resolve ,it says resolution succeeded

facing the exact same problem. Did you found any solution?

How do I do that? Firstly, what does drag do? and how do I had a max speed limit? For my movement I did this, rb.addforce(rb.transform.forward * walkspeed * time.deltatime), something like that, so if I want to put a speed limit how do I do that?

3 Answers

3

Old post but I was also getting an error similar to this and solved in by manually downloading the zip file found in C:\Users[Username].gradle\wrapper\dists\gradle-5.1.1-bin[Folder] from Gradle Distributions

So take note of the zip file already in there (mainly the version). Try manually extract it and if it is found to be corrupt delete everything in that folder and manually paste in the downloaded one.

Basically what I think is happening is due to my poor internet connection, the zip file didn’t download correctly so when you Force Resolve in Unity it’s trying to extract the zip file, but the file is corrupted… Maybe just completely removing the zip file works too (maybe it will redownload it automatically) but manually downloading it will ensure it’s correctly downloaded.

Also make sure you have an internet connection when you Force Resolve.

Hello, sir thank you very much You just saved my time. been working 3 days with this error now I got the solution. bravo. thanks again

Thanks a lot! It solves my issue!!!

Your Admob ads show in game just click reslove instead of force resolve? ,Same force resolve always show above error.

Finally. This video Solved the Problem…!! Thanks!!!

yes, that is basically the workflow I think. you need to find/use a custom shader that will make your materials/objects to look as you want. if not, try working with the exposure, maybe you can pop the materials a bit more like that. it looks good to me except is a bit dark. but I don't know what look are you after in the end