此处的地图初始化在onEngineInitializationCompleted下给出MISSING_LIBRARIES(错误错误)

时间:2019-04-25 13:26:42

标签: android here-maps-rest

这是这里地图初始化的代码。

        if (m_mapFragment != null) {
        /* Initialize the SupportMapFragment, results will be given via the called back. */
            m_mapFragment.init(new OnEngineInitListener() {
                @Override
                public void onEngineInitializationCompleted(Error error) {

                    if (error == Error.NONE) {
                        m_map = m_mapFragment.getMap();
                        isMapReady = true;
                        posManager = PositioningManager.getInstance();

                        // Register positioning listener
                        posManager.addListener(
                                new WeakReference<PositioningManager.OnPositionChangedListener>(positionListener));
                        if (posManager != null) {
                            posManager.start(
                                    PositioningManager.LocationMethod.GPS_NETWORK);
                        }
                    /*
                     * Get the NavigationManager instance.It is responsible for providing voice
                     * and visual instructions while driving and walking
                     */
                        m_navigationManager = NavigationManager.getInstance();

                        final VoiceCatalog voiceCatalog = VoiceCatalog.getInstance();
                        voiceCatalog.downloadCatalog(new VoiceCatalog.OnDownloadDoneListener() {

                            @Override
                            public void onDownloadDone(VoiceCatalog.Error error) {
                                if (error == VoiceCatalog.Error.NONE) {
                                    // Get the list of voice packages from the voice catalog list
                                    List<VoicePackage> voicePackages = voiceCatalog.getCatalogList();
                                    // select
                                    for (VoicePackage vPackage : voicePackages) {
                                        if (vPackage.getMarcCode().compareToIgnoreCase("eng") == 0) {
                                            if (vPackage.isTts()) {
                                                vid = vPackage.getId();
                                                    voiceCatalog.downloadVoice(vid, new VoiceCatalog.OnDownloadDoneListener() {
                                                        @Override
                                                        public void onDownloadDone(VoiceCatalog.Error error) {
                                                            if (error == VoiceCatalog.Error.NONE) {
                                                                // set the voice skin for use by navigation manager
                                                                VoiceGuidanceOptions voiceGuidanceOptions =
                                                                        m_navigationManager.getVoiceGuidanceOptions();
                                                                voiceGuidanceOptions.setVoiceSkin(voiceCatalog.getLocalVoiceSkin(vid));
                                                            }
                                                        }
                                                    });
                                                    break;
                                            }
                                        }
                                    }
                                }
                            }
                        });

                    } else {
                        Toast.makeText(SpeedMediatorActivity.this,
                                "ERROR: Cannot initialize Map with error " + error,
                                Toast.LENGTH_LONG).show();
                    }
                }
            });
        }

我遇到了错误对象->>

  

缺少本地库:gnustl_shared,gnustl_shared,gnustl_shared。有关正确的项目设置的详细信息,请参阅用户指南。   有人可以帮我吗?

1 个答案:

答案 0 :(得分:0)

您是否遵循了这里地图引擎的教程?就像您正确导入库一样?我认为问题出在图书馆的导入上

  1. 您是否添加了清单
  2. 您是否解压缩了内容,然后将其解压缩到android应用程序库中?
  3. 您错过了任何步骤吗?