这是这里地图初始化的代码。
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。有关正确的项目设置的详细信息,请参阅用户指南。 有人可以帮我吗?
答案 0 :(得分:0)
您是否遵循了这里地图引擎的教程?就像您正确导入库一样?我认为问题出在图书馆的导入上