If ads are not showing on a new build and you encounter the following exception in your runtime device logs, then the SDK and adapter dependencies have resolved to versions that are not supported by the current Mediation package.
AndroidJavaException: java.lang.NoSuchMethodError: no static method with name=’initialize’
To resolve this exception:
- In the Unity Editor, open your project and go to Project Settings > Player > Publish Settings > Custom Main Gradle Template. Ensure that the Custom Main Gradle Template checkbox is enabled.
- Go to the Project tab, and then go to Assets > PlayServicesResolver > Android Resolver > Force Resolve.
Gradle will now fetch dependencies that are suitable for your current package.
For more information, see the Unity Mediation documentation.