question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multiple dex files define Lcom/ogaclejapan/smarttablayout/utils/BuildConfig

See original GitHub issue

Hi,

i’m using the gradle tool 1.4.0 and when i’m trying to use your library i’m getting the following error message:

:app:transformClassesAndResourcesWithExtractJarsForDebug UP-TO-DATE

UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Lcom/ogaclejapan/smarttablayout/utils/BuildConfig;
    at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
    at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
    at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
    at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
    at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
    at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
    at com.android.dx.command.dexer.Main.run(Main.java:277)
    at com.android.dx.command.dexer.Main.main(Main.java:245)
    at com.android.dx.command.Main.main(Main.java:106)


:app:transformClassesWithDexForDebug FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.transform.api.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2

Does anybody know how to solve this?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
sdasrccommented, Jan 4, 2017

When you add dependencies to build.gradle, use only one of the below compile ‘com.ogaclejapan.smarttablayout:utils-v4:1.6.1@aar’ or compile ‘com.ogaclejapan.smarttablayout:utils-v13:1.6.1@aar’

While utils-v4 contains the PagerAdapter implementation class for android.support.v4.app.Fragment, utils-v13 library contains the PagerAdapter implementation class for android.app.Fragment. I prefer utils-v4.

1reaction
ogaclejapancommented, Oct 10, 2015

Hi, @T0bbes

Do you define both the utils-v4 and utils-v13?

Read more comments on GitHub >

github_iconTop Results From Across the Web

com.android.dex.DexException: Multiple dex files define
I did a search and my application.iml file clearly showed the duplicates. ... run into this issue if two different artifacts include the...
Read more >
Multiple dex files define Lcom/google/android/gms/internal ...
I got this error after linking the library with the Android project Unknown source file : UNEXPECTED TOP-LEVEL EXCEPTION: Unknown source ...
Read more >
Error Unable to execute dex Multiple dex files define - Edureka
Unable to execute dex: Multiple dex files define Landroid/support/v4/app/ActivityCompatHoneycomb;. I've seen this error since updating to ADT 15 ...
Read more >
Multiple dex files define Lcom/google/unity/BuildConfig
Hi! I'm struggling to create a Unity build for Android (I'm new to Android as a platform). I get this error: ``` Execution...
Read more >
Multiple dex files error - Can't build any longer - Older Project
Hello, I see this issue is affecting lots of older projects. I was able to completely build my Ionic project and get it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found