After upgrading to version 0.14.2 of Gradle plugin, I'm receiving the 
following error during the dx task:

> com.android.ide.common.internal.LoggedErrorException: Failed to run 
command:
C:\bin\sdk\build-tools\21.1.0\dx.bat -JXmx4g --dex --force-jumbo 
--multi-dex --main-dex-list 
D:\x\y\build\intermediates\multi-dex\debug\maindexlist.txt 
--set-max-idx-number=60000 --output D:\x\y\build\intermediates\dex\debug 
--input-list=D:\x\y\build\intermediates\tmp\dex\debug\libraryList.txt
Error Code:
2
Output:
 UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Too many classes in --main-dex-list, main dex 
capacity exceeded
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:494)
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)

Attaching some dex statistics as well:
  annotation: 2853 items; 52698 bytes total
    4..406 bytes/item; average 18
  annotation set: 2652 items; 28340 bytes total
    4..28 bytes/item; average 10
  annotation set ref list: 23 items; 268 bytes total
    8..20 bytes/item; average 11
  annotations directory: 1911 items; 55808 bytes total
    16..784 bytes/item; average 29
  class data: 2606 items; 267584 bytes total
    9..6687 bytes/item; average 102
  class def: 2686 items; 85952 bytes total
    32 bytes/item
  code: 21150 items; 2589324 bytes total
    20..27328 bytes/item; average 122
  debug info: 21127 items; 561607 bytes total
    5..2189 bytes/item; average 26
  encoded array: 601 items; 169167 bytes total
    2..16682 bytes/item; average 281
  field id: 55438 items; 443504 bytes total
    8 bytes/item
  header: 1 item; 112 bytes total
    112 bytes/item
  map list: 1 item; 220 bytes total
    220 bytes/item
  method id: 33015 items; 264120 bytes total
    8 bytes/item
  proto id: 7015 items; 84180 bytes total
    12 bytes/item
  string data: 62775 items; 1537311 bytes total
    2..1599 bytes/item; average 24
  string id: 62775 items; 251100 bytes total
    4 bytes/item
  type id: 5637 items; 22548 bytes total
    4 bytes/item
  type list: 4202 items; 38558 bytes total
    6..68 bytes/item; average 9

Everything works well on v.0.14.0. Any suggestions for what could go wrong?

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" 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/d/optout.

Reply via email to