As of August 2025, @munsif even if you get the correct version you will get class dublicate error when compiling.
This is the tried and proven fix:
Do not use this lib:
implementation 'com.google.android.gms:play-services:17.0.0'
This is the correct lib:
implementation("com.google.android.gms:play-services-maps:17.0.0")
Why you ask? This will not cause dublicate errors.
By this type check the latest version.