首页 > 解决方案 > 在 onEngineInitializationCompleted 下给出 MISSING_LIBRARIES 的地图初始化(错误错误)

问题描述

这是here-map初始化的代码。

        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。有关正确项目设置的详细信息,请参阅用户指南。有人可以帮我吗。

标签: androidhere-maps-rest

解决方案


您是否按照此处地图引擎的教程进行操作?就像您正确导入库一样吗?我认为问题在于库的导入

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

推荐阅读