代码之家  ›  专栏  ›  技术社区  ›  Toni Petrina

将Google Maps API和诺基亚X HERE参考库集成到一个APK中

  •  1
  • Toni Petrina  · 技术社区  · 11 年前

    我正在查看将谷歌地图API和诺基亚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$AccessibilityServicesInfoVersionImpl;

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

    2 回复  |  直到 11 年前
        1
  •  1
  •   riksa    10 年前

    看起来您已将支持库添加到项目中两次。我想你已经将它添加为一个外部jar,它也在你的项目中 /图书馆 .

    如果您正在使用Eclipse,请右键单击项目并导航到 Java构建路径->图书馆 您可能会看到android-support-v4.jar列出了两次:作为外部jar和 Android专用库 .拆下不在下面的 Android专用库 .

    无槽堵头 :运行页面中提到的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地图工作键,以便实际查看地图。

        2
  •  0
  •   Dr.Jukka    10 年前

    您可以尝试多次检查包含哪个库。我会尝试先取消选中android私有库。