0
$\begingroup$

Rosanswers logo

Following the rostango wiki, continuing to run into problems, seems like a different error pops up with each reboot. Right now the initial and the rostango files successfully build with catkin_make and the rostango project opens ok in android-studio 0.6.1. However, when I try to run one of the samples, e.g. vio, I get this error:

com.android.dex.DexException: Multiple dex files define Lorg/apache/commons/codec/Decoder;

Searching suggests that this indicates redundant jar files. But which ones?

Here is the terminal output:

....... :tango_vio:processDebugResources UP-TO-DATE :tango_vio:generateDebugSources UP-TO-DATE :tango_vio:compileDebugJava :tango_vio:preDexDebug :tango_vio:dexDebug UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dex.DexException: Multiple dex files define Lorg/apache/commons/codec/Decoder; at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:594) at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:552) at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:533) at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:170) at com.android.dx.merge.DexMerger.merge(DexMerger.java:188) at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439) at com.android.dx.command.dexer.Main.runMonoDex(Main.java:287) at com.android.dx.command.dexer.Main.run(Main.java:230) at com.android.dx.command.dexer.Main.main(Main.java:199) at com.android.dx.command.Main.main(Main.java:103)

FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':tango_vio:dexDebug'.

com.android.ide.common.internal.LoggedErrorException: Failed to run command: /home/dbarry/Android/Sdk/build-tools/19.1.0/dx --dex --num-threads=4 --output


Originally posted by dan on ROS Answers with karma: 875 on 2014-12-13

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I removed all my JDK versions and replaced them with a single one (Oracle JDK 7), made sure all the paths and variables (e.g., JAVA_HOME in .bashrc, javaHome in android-studio) pointed to the JDK and this went away.


Originally posted by dan with karma: 875 on 2014-12-14

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by rudy on 2015-06-01:
Can you please explain more on this solution? I try would you did but I am still having this issue. I am thinking maybe I am doing it wrong so can you go in depth what you did. Thank you.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.