I'm currently experiencing an issue with my Android application which uses Google Maps. The problem seems to be a frequent crash when attempting to launch the Google Maps inside my Fragment.
Here is a brief overview of my setup:
- Google Maps SDK version: 18.1.0
- Target SDK version: 33
- Minimum SDK version: 21
Also, here are a screenshots from Crashlytics showing the crash logs:
Screenshot 1
Screenshot 2
The problem occurs mainly on Android 11 and Android 13, but I couldn't reproduce it on my device as it works fine there.
Inside XML file I'm using FragmentContainerView
to show the map:
<androidx.fragment.app.FragmentContainerView
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
...
/>
I have MapFragment
that is just a standard Fragment
that implements OnMapReadyCallback
with onMapReady(googleMap: GoogleMap)
method.
Has anyone encountered this issue before or does anyone have suggestions for potential solutions to this problem?