I wanted to do a quick patch for a library jar so I just put the class
patch source under the same path as in the library jar in my project src
tree.
The patch itself compiles.
But when I try to package I get a DexMerger error:
[dx] Merged dex A (500 defs/876.3KiB) with dex B (400
defs/362.4KiB). Result is 900 defs/1516.1KiB. Took 0.1sUNEXPECTED TOP-LEVEL
EXCEPTION:
[dx]
[dx] com.android.dex.DexException: Multiple dex files define
Lcom/some/path/PatchFile$1;
[dx] at
com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:593)
[dx] at
com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:551)
[dx] at
com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:532)
[dx] at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:169)
[dx] at com.android.dx.merge.DexMerger.merge(DexMerger.java:187)
[dx] at
com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439)
[dx] at com.android.dx.command.dexer.Main.runMonoDex(Main.java:287)
[dx] at com.android.dx.command.dexer.Main.run(Main.java:230)
[dx] at com.android.dx.command.dexer.Main.main(Main.java:199)
[dx] at com.android.dx.command.Main.main(Main.java:103)
It looks like DexMerger is using CollisionPolicy.FAIL and I would like to
set CollisionPolicy.KEEP_FIRST so it would use my new verson of the class.
How can I set this?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.