HarmonyOS 更换配置文件后,地图不显示,定位服务没有影响?

报错:

08-22 18:47:07.591   16786-16786   A00000/xxxx        E     MapRender [ERROR] [2024-08-22] [18:47:07:591] [Surface.cpp:507] [16786][ERROR]: Surface::OnExit, surface state is INVALID, no process exit event !
08-22 18:47:07.601   16786-17668   A00000/xxxx        E     MapRender [ERROR] [2024-08-22] [18:47:07:601] [NapiCallBackMgr.cpp:77] [17668][ERROR]: NativeResourceManager Release!
08-22 18:50:48.492   16786-16786   A00000/xxxx        E     MapRender [ERROR] [2024-08-22] [18:50:48:492] [NapiExports.cpp:33] [16786][ERROR]: MapInit IN !
08-22 18:50:48.497   16786-19944   A00000/xxxx        E     [ERROR] [2024-08-22] [18:50:48:497] [EglCore.cpp:38] [19944][ERROR]: chooseConfig ===> red(8) green(8) blue(8) alpha(8) depth(24) stencil(0)
08-22 18:50:48.497   16786-19944   A00000/xxxx        E     [ERROR] [2024-08-22] [18:50:48:497] [EglCore.cpp:38] [19944][ERROR]: chooseConfig ===> red(8) green(8) blue(8) alpha(8) depth(24) stencil(8)
08-22 18:50:48.497   16786-19944   A00000/xxxx        E     [ERROR] [2024-08-22] [18:50:48:497] [EglCore.cpp:38] [19944][ERROR]: chooseConfig ===> red(8) green(8) blue(8) alpha(8) depth(24) stencil(8)
08-22 18:50:48.497   16786-19944   A00000/xxxx        E     [ERROR] [2024-08-22] [18:50:48:497] [EglCore.cpp:38] [19944][ERROR]: chooseConfig ===> red(8) green(8) blue(8) alpha(8) depth(24) stencil(8)
08-22 18:50:48.503   16786-19944   A00000/xxxx        E     MapRender [ERROR] [2024-08-22] [18:50:48:503] [Background.cpp:25] [19944][ERROR]: Background Init Error
08-22 18:50:48.510   16786-19943   A00000/xxxx        E     [ERROR] [2024-08-22] [18:50:48:510] [NapiCallBackMgr.cpp:607] [19943][ERROR]: BytesFromAssetManager: get file size error! file(brand/brand_texture.json)
08-22 18:50:48.511   16786-19945   A00000/xxxx        E     MapRender [ERROR] [2024-08-22] [18:50:48:511] [LineStyleParser.cpp:412] [19945][ERROR]: SetTextObjColor error!
08-22 18:50:48.511   16786-19945   A00000/xxxx        E     MapRender [ERROR] [2024-08-22] [18:50:48:511] [LineStyleParser.cpp:283] [19945][ERROR]: outline-color :error css color:
  08-22 18:50:48.523   16786-19945   A00000/xxxx        E     [ERROR] [2024-08-22] [18:50:48:523] [NapiCallBackMgr.cpp:607] [19945][ERROR]: BytesFromAssetManager: get file size error! file(brand/brand_style.json)
08-22 18:50:48.523   16786-19944   A00000/xxxx        E     [ERROR] [2024-08-22] [18:50:48:523] [NapiCallBackMgr.cpp:83] [19944][ERROR]: CALL MOCK FUNC - OnMapReady()! xComponentId = 1724323848481777
08-22 18:50:48.526   16786-19944   A00000/xxxx        E     MapRender [ERROR] [2024-08-22] [18:50:48:526] [NapiCallBackMgr.cpp:98] [19944][ERROR]: OnMapReady() OUT !
08-22 18:50:49.137   16786-16786   A00000/xxxx        E     MapRender [ERROR] [2024-08-22] [18:50:49:136] [LineStyleParser.cpp:412] [16786][ERROR]: SetTextObjColor error!
08-22 18:50:49.137   16786-16786   A00000/xxxx        E     MapRender [ERROR] [2024-08-22] [18:50:49:137] [LineStyleParser.cpp:283] [16786][ERROR]: outline-color :error css color:
  08-22 18:50:49.146   16786-16786   A00000/xxxx        E     [ERROR] [2024-08-22] [18:50:49:146] [NapiCallBackMgr.cpp:607] [16786][ERROR]: BytesFromAssetManager: get file size error! file(brand/brand_style.json)
08-22 18:50:58.543   16786-16786   A00000/xxxx        E     MapRender [ERROR] [2024-08-22] [18:50:58:543] [MapView.cpp:442] [16786][ERROR]: VmpChangedDb: RequestVmpChanged vmpTileVersion is empty.
阅读 464
1 个回答

请着重检查下以下地方:地图组件无法正常显示可能原因:

1、请检查网络状态,地图需要外网加载。

2、请检查AGC上API管理里的地图服务是否已开通。

3、请检查项目模块级别下的src/main/module.json5(例如entry/src/main/module.json5)中是否正确配置了client\_id。4、排查下SHA256指纹是否有正确添加。

5、目前模拟器不支持map地图的显示,如果需要使用地图显示功能,请使用真机测试。

如果还是不行可以将手机时间往后调24小时,再测试。