我是靠谱客的博主 时尚天空,这篇文章主要介绍android 高德地图 出现 Attempt to read from field ‘android.view.Surface android.view.ViewRootImpl.m。。。项目场景:问题描述:原因分析:解决方案:,现在分享给大家,希望可以做个参考。
项目场景:
android 高德地图 出现 Attempt to read from field 'android.view.Surface android.view.ViewRootImpl.m。。。
问题描述:
将高德地图嵌入到fragment,然后切换页面时一直出现Attempt to read from field 'android.view.Surface android.view.ViewRootImpl.m。。。报错却正常运行。。。。
原因分析:
我经过多次debug,发现时 高德的问题。。。。开玩笑哈哈哈
解决方案:
在对应的xml文件中
<com.amap.api.maps.MapView android:id="@+id/map" android:layout_width="fill_parent" android:layout_height="fill_parent" />
将MapView 改成TextureMapView即可,即改成如下
<com.amap.api.maps.TextureMapView android:id="@+id/map" android:layout_width="fill_parent" android:layout_height="fill_parent" />
最后
以上就是时尚天空最近收集整理的关于android 高德地图 出现 Attempt to read from field ‘android.view.Surface android.view.ViewRootImpl.m。。。项目场景:问题描述:原因分析:解决方案:的全部内容,更多相关android内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复