在我的flutter应用程序中使用谷歌地图时,我的应用程序正在崩溃



以下是崩溃时的错误:-

Process: com.example.basic_setup, PID: 13613
java.lang.NullPointerException: Attempt to get length of null array
at java.nio.ByteBufferAsIntBuffer.put(ByteBufferAsIntBuffer.java:122)
at com.google.maps.api.android.lib6.gmm6.vector.gl.buffer.n.i(:com.google.android.gms.dynamite_mapsdynamite@223017097@22.30.17 (190400-0):2)
at com.google.maps.api.android.lib6.gmm6.vector.gl.buffer.n.d(:com.google.android.gms.dynamite_mapsdynamite@223017097@22.30.17 (190400-0):3)
at com.google.maps.api.android.lib6.gmm6.vector.gl.drawable.d.s(:com.google.android.gms.dynamite_mapsdynamite@223017097@22.30.17 (190400-0):2)
at com.google.maps.api.android.lib6.gmm6.vector.gl.drawable.ao.s(:com.google.android.gms.dynamite_mapsdynamite@223017097@22.30.17 (190400-0):12)
at com.google.maps.api.android.lib6.gmm6.vector.bz.s(:com.google.android.gms.dynamite_mapsdynamite@223017097@22.30.17 (190400-0):29)
at com.google.maps.api.android.lib6.gmm6.vector.bs.b(:com.google.android.gms.dynamite_mapsdynamite@223017097@22.30.17 (190400-0):151)
at com.google.maps.api.android.lib6.gmm6.vector.av.run(:com.google.android.gms.dynamite_mapsdynamite@223017097@22.30.17 (190400-0):48)

我在底部导航栏中从另一个屏幕快速导航到地图屏幕时出错。

这是映射v2:中的已知问题

https://issuetracker.google.com/issues/35829536

在xml文件中使用SupportMapFragment,而不是mapview。例如:

<fragment
class="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"/>

有关更多信息,请访问以下链接:

https://developers.google.com/android/reference/com/google/android/gms/maps/SupportMapFragment

https://developers.google.com/maps/documentation/android-api/map

相关内容

  • 没有找到相关文章

最新更新