import com.google.android.gms.maps.SupportMapFragment;
import androidx.fragment.Fragment;
...
private SupportMapFragment mMapFragment;
...
mMapFragment = (SupportMapFragment) form.getSupportFragmentManager().findFragmentByTag(MAP_FRAGMENT_TAG);
Here, the IDE shows an error that androidx.fragment.Fragment cannot cast to SupportMapFragment (which extends android.support.v4.app.Fragment)
I'm using the version 15.0.1 of the play-services-maps and version 1.0.0-beta01 of the AndroidX libraries.
I have not found any updates to SupportMapFragment after AndroidX in the release notes: https://developers.google.com/maps/documentation/android-sdk/releases
Edit: Before anyone asks, form
is an instance of Form
class which extends AppCompatActivity
(from AndroidX)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…