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

build fail for AndroidTest module after apply plugin. #14

Closed
eidola7 opened this issue Feb 9, 2018 · 2 comments
Closed

build fail for AndroidTest module after apply plugin. #14

eidola7 opened this issue Feb 9, 2018 · 2 comments
Assignees
Labels
Milestone

Comments

@eidola7
Copy link

eidola7 commented Feb 9, 2018

I got an build Error for AndroidTest.
It's only occur when run AndroidTest with module applied plugin. ( module compile has no error! )

Executing tasks: [:module:assembleDebug, :module:assembleDebugAndroidTest]
...
:sdk:transformClassesWithParanoidForDebug UP-TO-DATE
...
:sdk:transformClassesWithParanoidForDebugAndroidTest UP-TO-DATE
:sdk:transformClassesWithDexForDebugAndroidTest FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':sdk:transformClassesWithDexForDebugAndroidTest'.

com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lio/michaelrocks/paranoid/Deobfuscator;

Caused by: java.lang.RuntimeException: com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lio/michaelrocks/paranoid/Deobfuscator;

Caused by: com.android.dex.DexException: Multiple dex files define Lio/michaelrocks/paranoid/Deobfuscator;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:584)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:539)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:521)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:167)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:191)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:522)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:344)
at com.android.dx.command.dexer.Main.run(Main.java:292)
at com.android.builder.internal.compiler.DexWrapper.run(DexWrapper.java:54)
at com.android.builder.core.DexByteCodeConverter.lambda$dexInProcess$0(DexByteCodeConverter.java:174)

Do you have any suggestions?

I'm using espresso-core:2.2.2
androidTestCompile "com.android.support.test.espresso:espresso-core:2.2.2", {
exclude group: 'com.android.support'
}

@MichaelRocks
Copy link
Owner

@eidola7, thank you for the report and sorry for my delayed response. Seems the plugin generates two copies of Deobfuscator: one for the main project and another one for the test project. I'm afraid there's no workaround. I'll try to fix the plugin and generate a unique file per project.

@MichaelRocks MichaelRocks added this to the 0.1.8 milestone Feb 22, 2018
@MichaelRocks MichaelRocks self-assigned this Feb 22, 2018
@MichaelRocks
Copy link
Owner

@eidola7 Should be fixed in 0.1.8.

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

No branches or pull requests

2 participants