"Duplicate class found" error if play-services-ads:21.2.0 is used

Have you tried using 21.3.0 instead of 20.4.0?

Looks like a bug on the play-services-ads library, so might have been fixed on latest version