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?
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.
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.