Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'already added' exception when adding to library-project #9

Open
almozavr opened this issue Oct 20, 2014 · 0 comments
Open

'already added' exception when adding to library-project #9

almozavr opened this issue Oct 20, 2014 · 0 comments

Comments

@almozavr
Copy link

Trying to add multi-dex support to library project and get

UNEXPECTED TOP-LEVEL EXCEPTION:
    java.lang.IllegalArgumentException: already added: Lcom/android/test/runner/MultiDexTestRunner;
        at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:122)
        at com.android.dx.dex.file.DexFile.add(DexFile.java:161)
        at com.android.dx.command.dexer.Main.processClass(Main.java:732)
        at com.android.dx.command.dexer.Main.processFileBytes(Main.java:673)
        at com.android.dx.command.dexer.Main.access$300(Main.java:82)
        at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:602)
        at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
        at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
        at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
        at com.android.dx.command.dexer.Main.processOne(Main.java:632)
        at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
        at com.android.dx.command.dexer.Main.runMultiDex(Main.java:332)
        at com.android.dx.command.dexer.Main.run(Main.java:243)
        at com.android.dx.command.dexer.Main.main(Main.java:214)
        at com.android.dx.command.Main.main(Main.java:106)
    5 errors; aborting

It occurs when on connectedAndroidTest.
Also, there is a 4-5 very similar errors related to libs, that are added via jar files.
If I modify application's build.gradle with multi-dex support, remove it from library, everything seems to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant