import com.google.android.gms.maps.SupportMapFragment;
import androidx.fragment.Fragment;
...
private SupportMapFragment mMapFragment;
...
mMapFragment = (SupportMap
Finally, here is the perfect answer:
Add
android.enableJetifier=true
android.useAndroidX=true
to your gradle.properties file.
With Android Studio 3.2 or higher, migrate your project to AndroidX by selecting Refactor > Migrate to AndroidX from the menu.
(Most important) Some of your project imports (used in classes) will need to be replaced by equivalent AndroidX libraries. Here you can find libraries and their equivalents. Replace any imports that refer to pre-AndroidX libraries one-by-one.
Now you're good to go :-)