Ad

Unity Doesn't Resolve With Admob

- 1 answer

I am trying to add admob to my unity game, but the resolve step is not working PS:I am using a project provided by google to try admob so the problem isn't from the project.

I am using unity 5.0.2f1 and i downloaded this ad sample project but the ads were not showing. after some trial and error i tried to resolve, which gave me the error "Gradle failed to fetch dependencies" "Failed To Resolve"

This is the error description:

Gradle failed to fetch dependencies.

Failed to run 'C:\Users\owner\Desktop\HelloWorld\Temp\PlayServicesResolverGradle\gradlew.bat -b "C:\Users\owner\Desktop\HelloWorld\Temp\PlayServicesResolverGradle\PlayServicesResolver.scripts.download_artifacts.gradle" --no-daemon "-PANDROID_HOME=C:/AndroidSDK" "-PTARGET_DIR=C:\Users\owner\Desktop\HelloWorld\Assets\Plugins\Android" "-PMAVEN_REPOS=https://maven.google.com/" "-PPACKAGES_TO_COPY=com.google.android.gms:play-services-ads:17.2.0"'
stdout:
Downloading https://services.gradle.org/distributions/gradle-4.10-bin.zip


stderr:
java.io.IOException: Invalid keystore format
    at sun.security.provider.JavaKeyStore.engineLoad(Unknown Source)
    at sun.security.provider.JavaKeyStore$JKS.engineLoad(Unknown Source)
    at sun.security.provider.KeyStoreDelegator.engineLoad(Unknown Source)
    at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(Unknown Source)
    at java.security.KeyStore.load(Unknown Source)
    at sun.security.util.AnchorCertificates$1.run(Unknown Source)
    at sun.security.util.AnchorCertificates$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.security.util.AnchorCertificates.<clinit>(Unknown Source)
    at sun.security.provider.certpath.AlgorithmChecker.checkFingerprint(Unknown Source)
    at sun.security.provider.certpath.AlgorithmChecker.<init>(Unknown Source)
    at sun.security.provider.certpath.AlgorithmChecker.<init>(Unknown Source)
    at sun.security.validator.SimpleValidator.engineValidate(Unknown Source)
    at sun.security.validator.Validator.validate(Unknown Source)
    at sun.security.validator.Validator.validate(Unknown Source)
    at sun.security.validator.Validator.validate(Unknown Source)
    at javax.crypto.JarVerifier.isTrusted(JarVerifier.java:610)
    at javax.crypto.JarVerifier.verifySingleJar(JarVerifier.java:530)
    at javax.crypto.JarVerifier.verifyJars(JarVerifier.java:363)
    at javax.crypto.JarVerifier.verify(JarVerifier.java:289)
    at javax.crypto.JceSecurity.verifyProviderJar(JceSecurity.java:164)
    at javax.crypto.JceSecurity.getVerificationResult(JceSecurity.java:190)
    at javax.crypto.JceSecurity.canUseProvider(JceSecurity.java:204)
    at javax.crypto.KeyAgreement.getInstance(KeyAgreement.java:179)
    at sun.security.ssl.JsseJce.getKeyAgreement(Unknown Source)
    at sun.security.ssl.JsseJce$EcAvailability.<clinit>(Unknown Source)
    at sun.security.ssl.JsseJce.isEcAvailable(Unknown Source)
    at sun.security.ssl.CipherSuite$KeyExchange.isAvailable(Unknown Source)
    at sun.security.ssl.CipherSuite.isAvailable(Unknown Source)
    at sun.security.ssl.SSLContextImpl.getApplicableCipherSuiteList(Unknown Source)
    at sun.security.ssl.SSLContextImpl.access$100(Unknown Source)
    at sun.security.ssl.SSLContextImpl$AbstractTLSContext.<clinit>(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at java.security.Provider$Service.getImplClass(Unknown Source)
    at java.security.Provider$Service.newInstance(Unknown Source)
    at sun.security.jca.GetInstance.getInstance(Unknown Source)
    at sun.security.jca.GetInstance.getInstance(Unknown Source)
    at javax.net.ssl.SSLContext.getInstance(Unknown Source)
    at javax.net.ssl.SSLContext.getDefault(Unknown Source)
    at javax.net.ssl.SSLSocketFactory.getDefault(Unknown Source)
    at javax.net.ssl.HttpsURLConnection.getDefaultSSLSocketFactory(Unknown Source)
    at javax.net.ssl.HttpsURLConnection.<init>(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.<init>(Unknown Source)
    at sun.net.www.protocol.https.Handler.openConnection(Unknown Source)
    at sun.net.www.protocol.https.Handler.openConnection(Unknown Source)
    at java.net.URL.openConnection(Unknown Source)
    at org.gradle.wrapper.Download.downloadInternal(Download.java:55)
    at org.gradle.wrapper.Download.download(Download.java:44)
    at org.gradle.wrapper.Install$1.call(Install.java:61)
    at org.gradle.wrapper.Install$1.call(Install.java:48)
    at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
    at org.gradle.wrapper.Install.createDist(Install.java:48)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Exception in thread "main" java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
    at javax.net.ssl.DefaultSSLSocketFactory.throwException(Unknown Source)
    at javax.net.ssl.DefaultSSLSocketFactory.createSocket(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.createSocket(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:58)
    at org.gradle.wrapper.Download.download(Download.java:44)
    at org.gradle.wrapper.Install$1.call(Install.java:61)
    at org.gradle.wrapper.Install$1.call(Install.java:48)
    at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
    at org.gradle.wrapper.Install.createDist(Install.java:48)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Caused by: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
    at java.security.Provider$Service.newInstance(Unknown Source)
    at sun.security.jca.GetInstance.getInstance(Unknown Source)
    at sun.security.jca.GetInstance.getInstance(Unknown Source)
    at javax.net.ssl.SSLContext.getInstance(Unknown Source)
    at javax.net.ssl.SSLContext.getDefault(Unknown Source)
    at javax.net.ssl.SSLSocketFactory.getDefault(Unknown Source)
    at javax.net.ssl.HttpsURLConnection.getDefaultSSLSocketFactory(Unknown Source)
    at javax.net.ssl.HttpsURLConnection.<init>(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.<init>(Unknown Source)
    at sun.net.www.protocol.https.Handler.openConnection(Unknown Source)
    at sun.net.www.protocol.https.Handler.openConnection(Unknown Source)
    at java.net.URL.openConnection(Unknown Source)
    at org.gradle.wrapper.Download.downloadInternal(Download.java:55)
    ... 7 more
Caused by: java.io.IOException: Invalid keystore format
    at sun.security.provider.JavaKeyStore.engineLoad(Unknown Source)
    at sun.security.provider.JavaKeyStore$JKS.engineLoad(Unknown Source)
    at sun.security.provider.KeyStoreDelegator.engineLoad(Unknown Source)
    at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(Unknown Source)
    at java.security.KeyStore.load(Unknown Source)
    at sun.security.ssl.TrustManagerFactoryImpl.getCacertsKeyStore(Unknown Source)
    at sun.security.ssl.SSLContextImpl$DefaultManagersHolder.getTrustManagers(Unknown Source)
    at sun.security.ssl.SSLContextImpl$DefaultManagersHolder.<clinit>(Unknown Source)
    at sun.security.ssl.SSLContextImpl$DefaultSSLContext.<init>(Unknown Source)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    ... 20 more

exit code: 1

UnityEngine.Debug:LogError(Object)
Google.Logger:Log(String, LogLevel) (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/Logger.cs:103)
GooglePlayServices.PlayServicesResolver:Log(String, LogLevel) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:757)
GooglePlayServices.<GradleResolution>c__AnonStorey1D:<>m__3A(Result) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:849)
GooglePlayServices.<GradleResolution>c__AnonStorey1F:<>m__48() (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:922)
Google.RunOnMainThread:ExecuteNext() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:377)
Google.RunOnMainThread:<ExecuteAll>m__16() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:408)
Google.RunOnMainThread:RunAction(Action) (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:234)
Google.RunOnMainThread:ExecuteAll() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:406)
Google.RunOnMainThread:Run(Action, Boolean) (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:363)
GooglePlayServices.<GradleResolution>c__AnonStorey1D:<>m__3B(Result) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:922)
GooglePlayServices.ProgressReporter:SignalComplete() (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/CommandLineDialog.cs:116)
GooglePlayServices.ProgressReporter:CommandLineToolCompletion(Result) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/CommandLineDialog.cs:107)
GooglePlayServices.<RunAsync>c__AnonStorey2:<>m__4() (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/CommandLine.cs:136)
Google.RunOnMainThread:ExecuteNext() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:377)
Google.RunOnMainThread:<ExecuteAll>m__16() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:408)
Google.RunOnMainThread:RunAction(Action) (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:234)
Google.RunOnMainThread:ExecuteAll() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:406)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
Ad

Answer

I Lost hope and got a new pc and upgraded to unity 2019.1.8f1 Ads now work

Ad
source: stackoverflow.com
Ad