Android build fails with Unity Ads 4.7.0

Our game was building successfully for Android a week ago but is now failing. The Unity Ads package is pulled in automatically by the external dependency resolver and the problem appears to be due to a change going from 4.6.1 to 4.7.0. This is the error:

It built fine with 4.6.1.

Looking at the diff between 4.6.1 and 4.7.0, a property element has been added:

Looking at the documentation for the property element <property>  |  Android Developers, it was added in API level 31. As the build tools Unity uses are 30.0.2 (Unity 2021.3 LTS), I’m wondering if this is the issue?

1 Like

Are you using mediation or only using Unity Ads SDK? Which tool do you use to integrate Unity Ads, Android Studio or Unity Editor?

We’re using Advertisement with Mediation 1.0.5. Integration is using Unity Editor (2021.3.16f1), with the default SDKs/tools it installs.

I see now 4.7.1 has been released and can confirm that that fixes the build issue.

2 Likes

Where is 4.7.1 version bro. I can’t find it. https://developers.google.com/admob/unity/mediation/unity#unity-ads-unity-mediation-plugin-changelog

I am running into same issue

Looks like they haven’t released an update that pulls in 4.7.1. We’re using Unity’s Advertisement with Mediation and the External Dependency Manager pulled in the new version for us.

1 Like

Anyway I used older version, unity adapter 3.6.0 works for me now

Thanks! a combination of this, and using target API 33 worked for me.

still the same to me, using unity levelplay (I’ll switch soon it’s horrendous, keep bugging, low fill rates)

Had the same problem.

In the Unity Ads version 4.7.0 they introduced something which required a higher gradle version than the one unity is currently using (at least the one which unity 2021.3 is using). You have to upgrade to 4.7.1 in order to fix this problem.

https://docs.unity.com/ads/en-us/manual/Changelog

If you are using the Google Mobile Ads Plugin with Unity mediation locate the ‘UnityMediationDependencies.xml’ in your project and open it.

Here change:

=>

And also

=>
1 Like

Good to know thanks, I just changed the unity-ads to 4.7.1 and it builded correctly. I’ll change the mediation one too !

bro how i can solve this issue i am using admob ads with meta mediation

For me I’ve downgraded Admob adapter version found Assets\MaxSdk\Mediation\Google\Editor
from

to

1 Like

Thx. This solved my error