Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Andorid 4.4.4 从地图页面返回黑屏闪退 #60

Closed
lifbliu opened this issue May 24, 2018 · 15 comments
Closed

Andorid 4.4.4 从地图页面返回黑屏闪退 #60

lifbliu opened this issue May 24, 2018 · 15 comments
Labels
android Only for Android can‘t reproduce Seems to be a local problem

Comments

@lifbliu
Copy link

lifbliu commented May 24, 2018

真机的版本为4.4.4,从地图页面返回上一页时黑屏闪退。没有看到任何报错,请问这个什么原因导致的,有没有什么办法可以解决。

@qiuxiang
Copy link
Owner

要用 android studio 看 logcat

@lifbliu
Copy link
Author

lifbliu commented May 24, 2018

@qiuxiang
你好,log里面报的这个错。
a vertex attribute index out of boundary is detected. Skipping corresponding vertex attribute. buf=0x0
05-24 03:09:36.961 4986-4986/com.cmos.netapp A/libc: Fatal signal 11 (SIGSEGV) at 0x00000018 (code=1), thread 4986 (com.cmos.netapp)

@qiuxiang
Copy link
Owner

最好截图

@lifbliu
Copy link
Author

lifbliu commented May 25, 2018

@qiuxiang 这是崩溃时的截图
_20180525150358

@lifbliu
Copy link
Author

lifbliu commented May 25, 2018

作者你好,我觉得这可能是地图组件没有销毁的问题。我从一个地图页面,直接跳转至另一个带有地图的页面时,上一个页面的地图组件还在。而且也没有办法清除。请问有什么方法可以在componentWillUnmount里面把地图组件手动清除了?
image

@lifbliu
Copy link
Author

lifbliu commented May 25, 2018

@qiuxiang 希望可以添加一个onDestory方法

@qiuxiang
Copy link
Owner

qiuxiang commented May 26, 2018

地图重叠的问题不是简单的 destory 可以解决的,一旦 destory 了上一层的地图,返回的时候就用不了了。这是 MapView 和 RN 的问题,目前的解决方法只能自己把 MapView 改为 TextureMapView。

你上面的截图也没有截到重点,标出来的地方并不能说明什么,而下面看起来才是重点。

@qiuxiang qiuxiang added android Only for Android can‘t reproduce Seems to be a local problem labels May 26, 2018
@lifbliu
Copy link
Author

lifbliu commented May 28, 2018

感谢回复,这是app闪退时抓到的日志。buz不知能否在这里面看出来问题的所在。至于你说的MapView改为TextureMapView的意思是改动源码吗?
1527488279

@qiuxiang
Copy link
Owner

改这里 https://github.com/qiuxiang/react-native-baidumap-sdk/blob/master/lib/android/src/main/java/cn/qiuxiang/react/baidumap/mapview/BaiduMapView.kt#L24

从 logcat 看,这个问题很可能是 SDK 的 bug,或不兼容问题

@qiuxiang
Copy link
Owner

你得换一个设备看看

@lifbliu
Copy link
Author

lifbliu commented May 28, 2018

谢谢作者,地图重叠的问题已经解决了。我换了一个模拟器,和真机(小米3移动版,安卓版本为4.4.4),还是有从地图页面返回时闪退的问题。我用的模拟器都是安卓4.4.4的版本,所以我想是不是因为安卓版本过低的问题。在安卓5,6,7等虚拟机上就没有闪退的问题。

@qiuxiang
Copy link
Owner

那应该就是 SDK 的兼容性问题

@lifbliu
Copy link
Author

lifbliu commented May 30, 2018

谢谢,已经跟产品商量不兼容低版本安卓了。

@cnpmge
Copy link

cnpmge commented Jul 16, 2019

请问地图重叠问题是怎么解决的呢?麻烦您说一下,我也遇到了这个问题

@cnpmge
Copy link

cnpmge commented Jul 16, 2019

你好,我会持续关注您的,请您帮忙解决,谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Only for Android can‘t reproduce Seems to be a local problem
Projects
None yet
Development

No branches or pull requests

3 participants