Ask Your Question
0

rostango multiple dex files

asked 2014-12-13 20:42:00 -0500

dan gravatar image

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
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-12-13 23:34:00 -0500

dan gravatar image

updated 2014-12-13 23:34:18 -0500

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.

edit flag offensive delete link more

Comments

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.

rudy gravatar image rudy  ( 2015-06-01 11:20:40 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-12-13 20:42:00 -0500

Seen: 683 times

Last updated: Dec 13 '14