android - 在一个 APK 中集成 Google Maps API 和 Google Maps API 的 Nokia X HERE 引用库

标签 android google-maps here-api nokiax

我正在研究将 Google Maps API 和 Nokia X HERE 引用库集成到一个 APK – 文档在这里 http://developer.nokia.com/resources/library/nokia-x/here-maps/one-apk-with-here-maps-and-google-maps.html

我正在按照文档页面上的视频教程中的步骤进行操作,但在尝试将支持库添加到项目时遇到了以下问题。知道如何继续吗?

  • [2014-02-25 16:06:45 - Dex Loader] 无法执行 dex:多个 dex 文件定义 Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;

  • [2014-02-25 16:06:45 - MapsDemo] 转换为 Dalvik 格式失败:无法执行 dex:多个 dex 文件定义 Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;

最佳答案

看起来您已将支持库添加到项目中两次。我认为您已将其添加为外部 jar,并且它也在您的项目 /libs 中。

如果您使用的是 Eclipse,请右键单击该项目并导航至 Java Build Path -> Libraries,您可能会看到 android-support-v4.jar 在那里列出了两次:作为外部 jar 和在Android 私有(private)库。删除不在 Android 私有(private)库 下的那个。

无耻插件:不过,运行该页面提到的 Github 演示要容易得多:

# clone HERE samples
$ git clone https://github.com/nokia-developer/nokia-x-here-maps-samples
$ cd nokia-x-here-maps-samples

# init submodules
$ git submodule update –init

# launch emulator (you need to create one first)
$ emulator -avd AVD_for_Nokia_X

# build and install debug version of MapsV1OneApk
$ cd MapsV1OneApk
$ ./gradlew installDebug # OS X/Linux
$ gradlew installDebug # Windows

# build and install debug version of MapsV2OneApk
$ cd ..
$ cd MapsV2OneApk
$ ./gradlew installDebug # OS X/Linux
$ gradlew installDebug # Windows

注意您需要为上述演示修改 AndroidManifest.xml 并插入有效的 HERE/Google map 键,以便实际查看 map 。

关于android - 在一个 APK 中集成 Google Maps API 和 Google Maps API 的 Nokia X HERE 引用库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22019587/

相关文章:

jquery - 使用 jquery 从 gmaps 获取并解析 JSON 以查找坐标

iOS SDK | NMAMapOverlay 未显示在正确的位置

javascript - 如何禁用鼠标滚动?

android - 获取 API 级别 <15 的可绘制密度

iphone - 在iOS 6中是绝对不能使用Google map 的吗?

java - 为什么我必须抛出这个语句才能得到结果?

java - 添加 Play Services 依赖项会导致与 Firebase 发生冲突

here-api - 这里 Maps API Auto Suggest results for resultType house Number 仅返回标签

java - if block 中的逻辑有缺陷

安卓数据编码