在模拟器调试可以加载地图,使用了
Environment.setOpenGLMode(false);
真机调试的时候我将此行代码注释,无法加载地图;
控制台警告如下
E/libEGL: eglMakeCurrentImpl:980 error 3006 (EGL_BAD_CONTEXT)
1.加载的是在线地图
2.真机型号是红米K40 系统版本是MIUI 13
3.日志如下:
2022-12-08 15:45:09| 29| EGf001| 4072170608| error| 查找Graphics类型为9的UGGraphicsManager失败| jni/JB/32/Graphics/../../../Src/Graphics/UGGraphicsManager.cpp(282) 2022-12-08 15:45:09| 0| EAg031| 4072170608| error| 查找Graphics类型为9的UGGraphicsManager失败| jni/JB/32/Graphics/../../../Src/Graphics/UGGraphicsManager.cpp(90) 2022-12-08 15:45:09| 183| EFd063| 4072170608| warning| 调整比例系数失败| jni/JB/32/Drawing/../../../Src/Drawing/UGDrawParamaters.cpp(2061) 2022-12-08 15:45:09| 0| EFd063| 4072170608| warning| 调整比例系数失败| jni/JB/32/Drawing/../../../Src/Drawing/UGDrawParamaters.cpp(2062) 2022-12-08 15:45:09| 0| EGg018| 4072170608| warning| 已经是全幅显示| jni/JB/32/Drawing/../../../Src/Drawing/UGDrawParamaters.cpp(1497) 2022-12-08 15:45:09| 0| EFd063| 4072170608| warning| 调整比例系数失败| jni/JB/32/Drawing/../../../Src/Drawing/UGDrawParamaters.cpp(2061) 2022-12-08 15:45:09| 0| EFd063| 4072170608| warning| 调整比例系数失败| jni/JB/32/Drawing/../../../Src/Drawing/UGDrawParamaters.cpp(2062) 2022-12-08 15:45:09| 0| EGg018| 4072170608| warning| 已经是全幅显示| jni/JB/32/Drawing/../../../Src/Drawing/UGDrawParamaters.cpp(1497) 2022-12-08 15:45:10| 282| EGg018| 3065008576| warning| 已经是全幅显示| jni/JB/32/Drawing/../../../Src/Drawing/UGDrawParamaters.cpp(1497) 2022-12-08 15:45:10| 0| EFd063| 3065008576| warning| 调整比例系数失败| jni/JB/32/Drawing/../../../Src/Drawing/UGDrawParamaters.cpp(2061) 2022-12-08 15:45:10| 0| EFd063| 3065008576| warning| 调整比例系数失败| jni/JB/32/Drawing/../../../Src/Drawing/UGDrawParamaters.cpp(2062) 2022-12-08 15:45:10| 0| EGg018| 3065008576| warning| 已经是全幅显示| jni/JB/32/Drawing/../../../Src/Drawing/UGDrawParamaters.cpp(1497) 2022-12-08 15:45:10| 0| EFd063| 3065008576| warning| 调整比例系数失败| jni/JB/32/Drawing/../../../Src/Drawing/UGDrawParamaters.cpp(2061) 2022-12-08 15:45:10| 0| EFd063| 3065008576| warning| 调整比例系数失败| jni/JB/32/Drawing/../../../Src/Drawing/UGDrawParamaters.cpp(2062) 2022-12-08 15:45:10| 1| EGg018| 3065008576| warning| 已经是全幅显示| jni/JB/32/Drawing/../../../Src/Drawing/UGDrawParamaters.cpp(1497) 2022-12-08 15:45:10| 0| EFd063| 3065008576| warning| 调整比例系数失败| jni/JB/32/Drawing/../../../Src/Drawing/UGDrawParamaters.cpp(2061) 2022-12-08 15:45:10| 0| EFd063| 3065008576| warning| 调整比例系数失败| jni/JB/32/Drawing/../../../Src/Drawing/UGDrawParamaters.cpp(2062) 2022-12-08 15:45:10| 0| EGg018| 3065008576| warning| 已经是全幅显示| jni/JB/32/Drawing/../../../Src/Drawing/UGDrawParamaters.cpp(1497) 2022-12-08 15:45:10| 99| EAg034| 4072170608| error| 从网络上得到文件错误| jni/JB/32/NetToolkit/../../../Src/NetToolkit/UGHttpHelper.cpp(732) 2022-12-08 15:45:10| 2| -100| 4072170608| error| Read file failed!!! strFilePath =/storage/emulated/0/SuperMap/data/Rest/192.168.4.21_8090/map-zkgq/zkyzt/zkyzt.sci| jni/JB/32/CacheFile/../../../Src/CacheFile/UGMapCacheFile.cpp(337) 2022-12-08 15:45:10| 1| -100| 4072170608| error| Load file failed!!! strPath =/storage/emulated/0/SuperMap/data/Rest/192.168.4.21_8090/map-zkgq/zkyzt/zkyzt.sci| jni/JB/32/CacheFile/../../../Src/CacheFile/UGStrategyMapCacheFile.cpp(170) 2022-12-08 15:45:10| 0| EGg040| 4072170608| error| 读取XML信息失败| jni/JB/32/MapServiceStub/../../../Src/MapServiceStub/UGLocalCacheManager.cpp(189) 2022-12-08 15:45:10| 274| EGg018| 4072170608| warning| 已经是全幅显示| jni/JB/32/Drawing/../../../Src/Drawing/UGDrawParamaters.cpp(1497) 2022-12-08 15:45:10| 0| EGg018| 4072170608| warning| 已经是全幅显示| jni/JB/32/Drawing/../../../Src/Drawing/UGDrawParamaters.cpp(1497) 2022-12-08 15:45:10| 0| EGg018| 4072170608| warning| 已经是全幅显示| jni/JB/32/Drawing/../../../Src/Drawing/UGDrawParamaters.cpp(1497) 2022-12-08 15:45:10| 137| EGg018| 4072170608| warning| 已经是全幅显示| jni/JB/32/Drawing/../../../Src/Drawing/UGDrawParamaters.cpp(1497) 2022-12-08 15:45:10| 5| -100| 4072170608| error| 要绘制的几何对象为空| jni/JB/32/UGM/../../../Src/UGM/SiCollector.cpp(125) 2022-12-08 15:45:10| 2| EGg018| 4072170608| warning| 已经是全幅显示| jni/JB/32/Drawing/../../../Src/Drawing/UGDrawParamaters.cpp(1497) 2022-12-08 15:45:10| 1| -100| 4072170608| error| 要绘制的几何对象为空| jni/JB/32/UGM/../../../Src/UGM/SiCollector.cpp(125) 2022-12-08 15:45:10| 10| EGg018| 4072170608| warning| 已经是全幅显示| jni/JB/32/Drawing/../../../Src/Drawing/UGDrawParamaters.cpp(1497) 2022-12-08 15:45:10| 1| EGg018| 4072170608| warning| 已经是全幅显示| jni/JB/32/Drawing/../../../Src/Drawing/UGDrawParamaters.cpp(1497) 2022-12-08 15:45:10| 1| -100| 4072170608| error| 要绘制的几何对象为空| jni/JB/32/UGM/../../../Src/UGM/SiCollector.cpp(125) 2022-12-08 15:45:14| 3514| -100| 4072170608| error| 要绘制的几何对象为空| jni/JB/32/UGM/../../../Src/UGM/SiCollector.cpp(125) 2022-12-08 15:45:14| 3| -100| 4072170608| error| 要绘制的几何对象为空| jni/JB/32/UGM/../../../Src/UGM/SiCollector.cpp(125) 2022-12-08 15:45:14| 498| -100| 4072170608| error| 要绘制的几何对象为空| jni/JB/32/UGM/../../../Src/UGM/SiCollector.cpp(125) 2022-12-08 15:45:14| 3| -100| 4072170608| error| 要绘制的几何对象为空| jni/JB/32/UGM/../../../Src/UGM/SiCollector.cpp(125) 2022-12-08 15:45:15| 398| -100| 4072170608| error| 要绘制的几何对象为空| jni/JB/32/UGM/../../../Src/UGM/SiCollector.cpp(125) 2022-12-08 15:45:15| 3| -100| 4072170608| error| 要绘制的几何对象为空| jni/JB/32/UGM/../../../Src/UGM/SiCollector.cpp(125) 2022-12-08 15:45:18| 3686| EFd063| 4072170608| warning| 调整比例系数失败| jni/JB/32/Drawing/../../../Src/Drawing/UGDrawParamaters.cpp(2061)
4.断点调试的时候发现
DatasourceConnectionInfo dsInfo1 = new DatasourceConnectionInfo(); dsInfo1.setServer("http://192.168.4.21:8090/iserver/services/map-ChinaAyl/rest/maps/ChinaDark");
Datasource ds1 = m_woWorkspace.getDatasources().open(dsInfo1); 中的ds1为null,模拟器调试则有内容
这里的Datasource 是为 null的
您好 ,这里已经添加过了 但是依然datasoourse 为null
Datasource ds1 = m_woWorkspace.getDatasources().open(dsInfo1);
这里的 dsInfo1是有数据的,但是Datasource ds1 为null