'Google support Map crashing

Google SupportMapFragment is crashing when executing this

( (SupportMapFragment)getChildFragmentManager().findFragmentById(
              R.id.map)).getMapAsync(googleMap -> presenter.onMapReady(googleMap, getContext()));

with the nullpointer and the stacktrace is:

java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference at com.google.maps.api.android.lib6.gmm6.vector.gl.aj.b(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (150400-0):2) at com.google.maps.api.android.lib6.gmm6.vector.gl.aj.(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (150400-0):2) at com.google.maps.api.android.lib6.gmm6.vector.gl.g.(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (150400-0):18) at com.google.maps.api.android.lib6.gmm6.vector.bs.d(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (150400-0):14) at com.google.maps.api.android.lib6.gmm6.vector.av.run(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (150400-0):44)

xml for the supportfragment is

<fragment
                        android:id="@+id/map"
                        android:name="com.google.android.gms.maps.SupportMapFragment"
                        class="com.google.android.gms.maps.SupportMapFragment"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent" />


Solution 1:[1]

It looks like Google Map issue. Clearing the app cache helps me.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Denis Abdullabekov