SupportMapFragment does not support AndroidX Fragment

后端 未结 10 1588
傲寒
傲寒 2020-11-30 11:04
import com.google.android.gms.maps.SupportMapFragment;
import androidx.fragment.Fragment;
...
private SupportMapFragment mMapFragment;
...
mMapFragment = (SupportMap         


        
10条回答
  •  离开以前
    2020-11-30 11:48

    You need to update the Android studio version to more than 3.2 it's still a beta version. The problem is Google Maps library is using Fragment class from the support library so it's conflicted with androidX, so Android Studio 3.2 version make refactor all dependencies to use androidX classes.

提交回复
热议问题