Resolution failed and Gradle failed to fetch dependencies.

So i am a unity beginner and got struck in an issue ,I build a game for android but as soon i followed a tut and imported google mobile add package 6.1 i faced this error constantly ,When ever i do face resolved it shows this error .

Now simple resolve has succeeded but and app has build successfully but I am not able to see even test ads in mobile build .I guess it has to do something with resolution thing .

I have tried everything to solve this issue from adding custom gradles to adding custom jdk and sdk paths but nothing seem to work .i tried every other possible solution on internet

PLease suggest me some solutions ,I am loosing my marbles now
My unity version 2020.3.f ,

1 Like

Hey mate !

You should try what’s said here : https://github.com/googlesamples/unity-jar-resolver/issues/384#issuecomment-716590310


Go to Preferences > External Tools

Copy the path in JDK installed with Unity
uncheck the box
Paste the same path but change the last / and it worked for me.


If it doesn’t work, go in Library/Java and see how many JVM you have on your computer, some people had to delete all the JVM except for openjdk-8


Hope it helps !

You can try this solution:

  • Delete Asset/Plugins Folder
  • Quit Unity
  • Delete All Folder (Except Asset & ProjectSetting)
  • Switch to Mono & back IL2CPP Again (In PlayerSetting → Other)
  • Click Asset/Play Services Resolver/Android Resolver/Delete Resolveed Library
  • Click Asset/Play Services Resolver/Android Resolver/Force Resolve

I hope it can help!

I resolved the issue by downloading and installing JDK 11.0.23 in my system and changed the path in JDK installed with unity with the path where JDK 11.0.23 was installed. The unity version is 2022.3.40f1