{"action":"closed","issue":{"url":"https://api.github.com/repos/facebook/buck/issues/588","labels_url":"https://api.github.com/repos/facebook/buck/issues/588/labels{/name}","comments_url":"https://api.github.com/repos/facebook/buck/issues/588/comments","events_url":"https://api.github.com/repos/facebook/buck/issues/588/events","html_url":"https://github.com/facebook/buck/issues/588","id":123876070,"number":588,"title":"How the buck solve the problem: DexIndexOverflowException?","user":{"login":"husky-yooho","id":13266960,"avatar_url":"https://avatars.githubusercontent.com/u/13266960?v=3","gravatar_id":"","url":"https://api.github.com/users/husky-yooho","html_url":"https://github.com/husky-yooho","followers_url":"https://api.github.com/users/husky-yooho/followers","following_url":"https://api.github.com/users/husky-yooho/following{/other_user}","gists_url":"https://api.github.com/users/husky-yooho/gists{/gist_id}","starred_url":"https://api.github.com/users/husky-yooho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/husky-yooho/subscriptions","organizations_url":"https://api.github.com/users/husky-yooho/orgs","repos_url":"https://api.github.com/users/husky-yooho/repos","events_url":"https://api.github.com/users/husky-yooho/events{/privacy}","received_events_url":"https://api.github.com/users/husky-yooho/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-25T12:03:39Z","updated_at":"2015-12-29T10:12:04Z","closed_at":"2015-12-29T10:12:04Z","body":"My project use: buck build app \r\nhave the problem:\r\n\r\nBUILD FAILED: //NewsArticle:NewsArticle#dex_merge failed on step dx with an exception:\r\nfield ID not in [0, 0xffff]: 65536\r\ncom.android.dex.DexIndexOverflowException: field ID not in [0, 0xffff]: 65536\r\n\tat com.android.dx.merge.DexMerger$5.updateIndex(DexMerger.java:482)\r\n\tat com.android.dx.merge.DexMerger$IdMerger.mergeSorted(DexMerger.java:302)\r\n\tat com.android.dx.merge.DexMerger.mergeFieldIds(DexMerger.java:471)\r\n\tat com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:173)\r\n\tat com.android.dx.merge.DexMerger.merge(DexMerger.java:195)\r\n\tat com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:484)\r\n\tat com.android.dx.command.dexer.Main.runMonoDex(Main.java:330)\r\n\tat com.android.dx.command.dexer.Main.run(Main.java:266)\r\n\tat com.android.dx.command.dexer.Main.run(Main.java:236)\r\n\tat com.facebook.buck.android.DxStep.executeInProcess(DxStep.java:193)\r\n\tat com.facebook.buck.android.DxStep.execute(DxStep.java:176)\r\n\tat com.facebook.buck.step.DefaultStepRunner.runStepForBuildTarget(DefaultStepRunner.java:63)\r\n\tat com.facebook.buck.rules.CachingBuildEngine.executeCommandsNowThatDepsAreBuilt(CachingBuildEngine.java:959)\r\n\tat com.facebook.buck.rules.CachingBuildEngine.access$7(CachingBuildEngine.java:942)\r\n\tat com.facebook.buck.rules.CachingBuildEngine$1.apply(CachingBuildEngine.java:362)\r\n\tat com.facebook.buck.rules.CachingBuildEngine$1.apply(CachingBuildEngine.java:1)\r\n\tat com.google.common.util.concurrent.Futures$ChainingListenableFuture.run(Futures.java:906)\r\n\tat com.google.common.util.concurrent.Futures$1$1.run(Futures.java:635)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n\r\n\r\n\r\n\r\n1、\r\nThe solution in gradle is adding the code:\r\n    defaultConfig {\r\n        // Enabling multidex support.\r\n        multiDexEnabled true\r\n}\r\n\r\ncompile 'com.android.support:multidex:1.0.0'\r\n\r\n\r\n\r\n2、\r\nNow the buck how to solve the DexIndexOverflowException problem?\r\n\r\n\r\n"}}