ResolutionException: Cannot find candidate artifact for com.google.android.gms:play-services-ads-lit

3,675 views
Skip to first unread message

Hernan

unread,
May 8, 2017, 4:04:41 PM5/8/17
to Google Mobile Ads SDK Developers
Hello

I updated the admob unity plugin and i´m having this error:

ResolutionException: Cannot find candidate artifact for com.google.android.gms:play-services-ads-lite:[10.2.4]
Google.JarResolver.PlayServicesSupport.GetDependencies (Google.JarResolver.Dependency dep, System.Collections.Generic.List`1 repoPaths)
Google.JarResolver.PlayServicesSupport.GetTransitiveDependencies (System.Collections.Generic.Dictionary`2 dependencies, System.Collections.Generic.List`1 repoPaths)
Google.JarResolver.PlayServicesSupport.FindMissingDependencyPaths (System.String destinationDirectory, System.Collections.Generic.Dictionary`2& dependencyPaths, Google.JarResolver.ExplodeAar explodeAar)
GooglePlayServices.ResolverVer1_1.DoResolution (Google.JarResolver.PlayServicesSupport svcSupport, System.String destinationDirectory, Google.JarResolver.OverwriteConfirmation handleOverwriteConfirmation, System.Action resolutionComplete)
GooglePlayServices.PlayServicesResolver.Resolve (System.Action resolutionComplete)
GooglePlayServices.PlayServicesResolver.MenuResolve ()

I was using admob plugin 3.1.0 and unity 5.4.2f2 without any errors, updating the SDK cause me the problem. I updated because i want to integrate Firebase Unity plugin.

I tried solving by updating Unity to Ver. 5.6.0f3 and the SDK 25.2.5 manager:
Android support repository 47
Android support library 23.2.1
Google play services 39
google repository 47

Now when i try to resolve dependencies the error shows again. I´m on Windows pc

Thank you for your help.


Joshua Lagonera (Mobile Ads SDK Team)

unread,
May 9, 2017, 2:16:28 AM5/9/17
to Google Mobile Ads SDK Developers
Hi there,

Interesting. I was able to replicate the error you are receiving from a clean copy of our sample app, the latest version of the Unity Plugin (3.4.0) and the latest version of Unity (5.6.0f3). I'm going to relay this to the rest of the team. Thank you for reporting this issue to us.

However, are you able to verify if the following workaround resolves the issue?
  1. Create a backup of your Unity Project.
  2. Download the latest Unity Plugin of the Unity Play Services Resolver here.
  3. Remove the Assets > PlayServicesResolver folder in your Unity Project.
  4. Import the Unity Plugin of the Unity Play Services Resolver in your Unity Project and Import "All".
  5. Go to the Assets Menu on the Menu bar and select Play Services Resolver > Android Resolver > Resolve Client Jars.
  6. Build and Run your project for Android.
Regards,
Joshua Lagonera
Mobile Ads SDK Team

Hernan

unread,
May 9, 2017, 11:42:22 PM5/9/17
to Google Mobile Ads SDK Developers
Hello Joshua

I tried what you suggested. 

First, I created a new unity project and imported only the admob plugin, the error shows right away.
I deleted the PlayServicesResolver folder and imported the Resolver plugin 1.2.20.0.
Resolved the Client Jars and a window reading "resolution complete" showed up.
I built this test project without errors.

Second, I repeated the procedure on a back up of my project achieving the same results. Note that in my project appeared a number of windows, one after another (3 or 4 windows), asking if i wanted to "replace" or "keep" the resolver version 9.8.0 with 10.2.0, I selected on each of the windows "replace".
Then I built the project and tested the game on my phone. It seems to be working fine, the ads are showing.

Also, I built the project before reading the solution you wrote and Unity does build the project but showing the error on the console. The ads on the game also appeared to be working.


Thank you!
Reply all
Reply to author
Forward
0 new messages