简体   繁体   中英

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@214516081@21.45.16 (150400-0):2) at com.google.maps.api.android.lib6.gmm6.vector.gl.aj.(:com.google.android.gms.dynamite_mapsdynamite@214516081@21.45.16 (150400-0):2) at com.google.maps.api.android.lib6.gmm6.vector.gl.g.(:com.google.android.gms.dynamite_mapsdynamite@214516081@21.45.16 (150400-0):18) at com.google.maps.api.android.lib6.gmm6.vector.bs.d(:com.google.android.gms.dynamite_mapsdynamite@214516081@21.45.16 (150400-0):14) at com.google.maps.api.android.lib6.gmm6.vector.av.run(:com.g oogle.android.gms.dynamite_mapsdynamite@214516081@21.45.16 (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" />

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM