1
votes

I’m looking at the integrating Google Maps API and Nokia X HERE reference libraries for Google Maps API to one APK – docs here http://developer.nokia.com/resources/library/nokia-x/here-maps/one-apk-with-here-maps-and-google-maps.html

I’m following the steps in the video tutorial on the doc page and running into the following issues when trying to add the support library to the project. Any clue how to continue?

  • [2014-02-25 16:06:45 - Dex Loader] Unable to execute dex: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;

  • [2014-02-25 16:06:45 - MapsDemo] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;

2

2 Answers

1
votes

Looks like you have support library added to the project twice. I think you have added it as an external jar and it's also in your projects /libs.

If you are using Eclipse, right click the project and navigate to Java Build Path -> Libraries and you might see android-support-v4.jar listed there twice: As an external jar and under Android Private Libraries. Remove the one that is not under Android Private Libraries.

Shameless plug: Running the Github demos that page mentions is a lot easier though:

# 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

NOTE You will need to modify AndroidManifest.xml for the above demos and insert working HERE/Google Maps keys in order to actually see the maps.

0
votes

You could try checking which library is included multiple times. I would try first unchecking the android private libraries.