Gradle failed to fetch dependencies

585 views
Skip to first unread message

Kunal Jadhav

unread,
Dec 4, 2017, 9:50:56 PM12/4/17
to Google Mobile Ads SDK Developers
Hello,
      I am working on Android Game and using Unity 2017.1.2f1 , Google Mobile Ads v3.9.......Before implementing Google mobile Ads , I have working project with Google Play games and Unity IAP but as soon as I intergrate Google Mobile Ads , I am getting this Error :

Gradle failed to fetch dependencies.

Failed to run 'E:\Studio\Developement\New Unity Project\Temp\PlayServicesResolverGradle\gradlew.bat -b "E:\Studio\Developement\New Unity Project\Temp\PlayServicesResolverGradle\PlayServicesResolver.scripts.download_artifacts.gradle" --no-daemon "-PANDROID_HOME=E:/sdk" "-PTARGET_DIR=E:\Studio\Developement\New Unity Project\Assets\Plugins\Android" "-PMAVEN_REPOS=https://maven.google.com" "-PPACKAGES_TO_COPY=com.google.android.gms:play-services-ads:11.6.0"'
stdout:


stderr:
Exception in thread "main" java.net.UnknownHostException: services.gradle.org
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.security.ssl.SSLSocketImpl.connect(Unknown Source)
at sun.security.ssl.BaseSSLSocketImpl.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
at org.gradle.wrapper.Download.downloadInternal(Download.java:60)
at org.gradle.wrapper.Download.download(Download.java:45)
at org.gradle.wrapper.Install$1.call(Install.java:62)
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.<GradleResolution>c__AnonStorey14:<>m__1F(Result)
GooglePlayServices.<GradleResolution>c__AnonStorey15:<>m__28()
GooglePlayServices.PlayServicesResolver:PumpUpdateQueue()
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()




Thanks in Advance

Ivan Bautista (Mobile Ads SDK Team)

unread,
Dec 5, 2017, 1:24:52 AM12/5/17
to Google Mobile Ads SDK Developers
Hi Kunal,

Could you check if you were able to follow the necessary setup instructions detailed here? If possible, for us to cross out other external factors, could you try doing a fresh build of our sample app (without any modifications) on the same computer/machine and see if you encounter the same build issues?

Regards,
Ivan Bautista
Mobile Ads SDK Team

Ivan Bautista (Mobile Ads SDK Team)

unread,
Dec 11, 2017, 3:57:37 AM12/11/17
to Google Mobile Ads SDK Developers
Hi Kunal,

Were you able to do a fresh build of our sample app (without any modifications) on the same computer/machine? Let us know if you are still having issues building in Gradle and if you've went through these setup instructions.
Reply all
Reply to author
Forward
0 new messages