"'mainTemplate.gradle' was not patched correctly"?

Hello!

I’m getting this error with the mainTemplate.gradle whenever I build my project, for Android.

This only happens when I install and set up Advertisement or Advertisement with Mediation.

.

When I click Resolve it gets stuck on BuildPreProccess and nothing happens thereon and can’t do anything but force shutdown Unity. The same thing happens if I click on Ignore.

I’ve gone through tutorials, searched on forums, re-installed Unity, and tried different versions, and nothing solved it.

.

All SDK’s and packages are working perfectly fine. The only problem that occurs is this, and I can’t find any post or video with the exact same problem.

.

Would appreciate a little help here, thanks.

.

201724-skarmbild-2022-11-11-234704.png
.
201725-skarmbild-2022-11-11-235010.png

1 Like

@jet-black Did you manage to get this sorted out?