Unity adapter Android dependency fails to resolve.

1,872 views
Skip to first unread message

Nick C

unread,
Jul 6, 2021, 8:16:00 PM7/6/21
to Google Mobile Ads SDK Developers
Hi, we're trying to setup GoogleAdsMobile with support for Unity ads via mediation. We only need the adapter, so have made the necessary changes to UnityMediationDependencies.xml to try and grab 'unity-adapter-only'.

However, when running EDM4U's Force Resolve for Android, this issue arises every time:
"Resolve failed due to com.google.ads.mediation:unity-adapter-only:3.5.0.0 missing for project :, attempted to use com.google.ads.mediation:unity-adapter-only:3.5.0.0, failed due to org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve com.google.ads.mediation:unity-adapter-only:3.5.0.0."

Which results in the error:
"Failed to fetch the following dependencies:
com.google.ads.mediation:unity-adapter-only:+"

Some info on the environment:
Unity v2019.4.16
GoogleAdsMobile (Unity) v5.4.0
Unity Mediation Plugin v2.5.0 
Unity Ads SDK v3.5.0
EDM4U v1.2.165

I see that the library still exists on the old read only hosting.
https://mvnrepository.com/artifact/com.google.ads.mediation/unity-adapter-only/3.5.0.0 

I thought the updated EDM4U might be and issue, but when I tried on an older project that ran v1.2.160 the same issue occurred. 

Any help would be much appreciated.
Kind Regards,
Nick



Mobile Ads SDK Forum Advisor

unread,
Jul 7, 2021, 2:25:58 AM7/7/21
to nick.ch...@artrix.com, google-adm...@googlegroups.com
Hi Nick,

Thank you for reaching out to us.

Could you please elaborate the details of your concern and what you're trying to accomplish here? As per our documentation, if you want to setup GoogleAdsMobile with support for Unity ads via mediation, you just need to download the unitypackage file and import it into your project as custom package.

Regards,
Google Logo
Teejay Wennie Pimentel
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2JZBDd:ref

Nick C

unread,
Jul 7, 2021, 2:37:10 AM7/7/21
to Google Mobile Ads SDK Developers
Hi Teejay, thanks for getting in touch.

What you've described is exactly what I'm trying to achieve, it's just not working.

Specifically the part that says:
"Then, select Assets > Play Services Resolver > Android Resolver > Force Resolve. The Unity Play Services Resolver library will perfrom dependency resolution from scratch and copy the declared dependencies into the Assets/Plugins/Android directory of your Unity app."

This fails to complete and outputs the error described in the initial post. "EDM4U" mentioned in that post is "Unity Play Services Resolver".

Hopefully this clears things up a bit,
Nick

Mobile Ads SDK Forum Advisor

unread,
Jul 7, 2021, 5:53:34 AM7/7/21
to nick.ch...@artrix.com, google-adm...@googlegroups.com
Hi Nick,

Thank you for getting back to us.

I've tried the latest version of the SDK v6.0.1 with unity ads mediation 2.7.0. and I didn't get any issues. Since you're using an old version of both SDK and adapter, would it be possible for you to use the latest version instead?

Nick C

unread,
Jul 7, 2021, 7:00:31 AM7/7/21
to Google Mobile Ads SDK Developers
Hi Teejay,

I am avoiding SDK v6+ for a couple of reasons.
1. The Unity Mediation Test Suite doesn't support that version. We launched with Admob previously (having strictly followed the guidelines for setting up test devices) and received a suspension for "Invalid activity: Self-clicking". So I don't want to try again without having every tool available verify that there are no issues anywhere with our ad units.
2. Unity ads mediation adapter v2.7.0 supports Unity ads v3.7.1 which has issues on Android (currently it is causing our app to become non-responsive in the production environment). So we have to move to a more stable version like v3.7.2 (mediation adapter not released) or because of reason #1 above, v3.5.0 (mediation adapter v2.5.0).

Kind Regards,
Nick

Mobile Ads SDK Forum Advisor

unread,
Jul 7, 2021, 3:54:15 PM7/7/21
to nick.ch...@artrix.com, google-adm...@googlegroups.com
Hi Nick,

Thank you for responding back to us. I have been looking over this. From what I can tell, I do believe it might be semi due to the EDMU and how it is pulling in the dependencies. As you will see in this Github post, it would appear that sometimes when running this it creates unneeded or previously imported dependencies. Which even we have seen on our side. We would suggest to search through and make sure that nothing is doubled up.

Regards,
Google Logo
William Pescherine
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2JZBDd:ref
Message has been deleted

Nick C

unread,
Jul 7, 2021, 8:56:35 PM7/7/21
to Google Mobile Ads SDK Developers
Hi William, 

Thanks for the response. That Github post doesn't seem to represent my issue, firstly because the only errors I get are this:
"Resolution failed

Failed to fetch the following dependencies:
com.google.ads.mediation:unity-adapter-only:+"

Nothing about duplicates and I don't see any related duplicates in my assets folder. It is just failing to fetch that particular dependency.

I have created a sample project in Unity v2019.4.16. In the root of that project there is a README that runs through the steps I took to create it. But hopefully all that is necessary is to run 'External Dependency Manager' -> 'Android Resolver' -> 'Resolve' or 'Force Resolve' and you'll be able to see the problem I'm encountering.

Kind Regards,
Nick

Mobile Ads SDK Forum Advisor

unread,
Jul 8, 2021, 3:32:07 AM7/8/21
to nick.ch...@artrix.com, google-adm...@googlegroups.com
Hi Nick,

Thank you for getting back to us. 

I've checked your steps, and have some question. Could you please confirm if you're importing our Unity Ads mediation Adapter and Unity Ads SDK 3.5.0 into the same app? The reason for confirmation is that importing Unity Ads SDK is not part of our implementation guide for Unity Ads mediation. 

On the other hand, I'm having trouble and stuck on step#3. Upon opening package manager, I wasn't able to add the Unity Ads 3.5.0. Could you please provide the next step on this?

Regards,
Google Logo
Teejay Wennie Pimentel
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2JZBDd:ref

Nick C

unread,
Jul 9, 2021, 1:33:06 AM7/9/21
to Google Mobile Ads SDK Developers
Hi Teejay,

Thanks for taking a look at the project. To reproduce the issue I'm having you shouldn't have to go through any of the steps mentioned in the README, that was only provided so that you had information on how I constructed the project.
To reproduce the issue it should just be a matter of loading the project then trying to resolve dependencies by running the following from the Unity menu:
'Assets' ->  'External Dependency Manager' -> 'Android Resolver' -> 'Resolve' or 'Force Resolve'.

To answer you questions:
1.

"Could you please confirm if you're importing our Unity Ads mediation Adapter"
Yes, I'm using v2.5.0 of your Unity Ads mediation adapter.

2.
"and Unity Ads SDK 3.5.0 into the same app?"
Yes, Unity Ads SDK 3.5.0 has been added to the project via Unity's package manager, as can be seen in the image "01 Unity ads package.PNG" (this image is in the same folder as the README file). To access the package manager and see this for yourself, use the Unity menu 'Window' -> 'Package Manager'.

3.
"I wasn't able to add the Unity Ads 3.5.0. Could you please provide the next step on this?"
This should already be added if you've opened the package manager in the provided project. It is called 'Advertisement' as can be seen in "01 Unity ads package.PNG".

4.

"I'm having trouble and stuck on step#3"
Again, you don't have to follow these steps, they are already done for that project. I just thought they might be helpful to explain how I created it.

Hopefully this clears things up a bit.
Kind Regards,
Nick

Mobile Ads SDK Forum Advisor

unread,
Jul 9, 2021, 5:14:58 AM7/9/21
to nick.ch...@artrix.com, google-adm...@googlegroups.com
Hi Nick,

Thank you for getting back to us.

I tried to open your sample app and followed your advise. As per checking, I was able to replicate the issue on my end. I also tried other different Unity version (2020.3.12f1) and still getting the same issue. With this, I've shared this to the rest of the team for further investigation and to get their insight as well. I'll update this thread the soonest they provide their feedback.

Mobile Ads SDK Forum Advisor

unread,
Sep 3, 2021, 6:00:51 AM9/3/21
to nick.ch...@artrix.com, google-adm...@googlegroups.com

Hi Nick,

I hope you're doing well.

I just want to circle back on this. The team recommend following for the latest instructions on importing the UnityAds plugin on Unity.

Regards,

Google Logo
Princess Pamela Pineda
Mobile Ads SDK Team
 

 

ref:_00D1U1174p._5004Q2JZBDd:ref
Reply all
Reply to author
Forward
0 new messages