首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我的应用程序在我的颤音应用程序中使用谷歌地图时崩溃了

我的应用程序在我的颤音应用程序中使用谷歌地图时崩溃了
EN

Stack Overflow用户
提问于 2022-09-23 11:29:48
回答 1查看 243关注 0票数 0

以下是崩溃时的错误:-

代码语言:javascript
复制
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)

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

EN

回答 1

Stack Overflow用户

发布于 2022-09-23 11:39:35

这是map v2中已知的问题:

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

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

代码语言:javascript
复制
<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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73827026

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档