我正在尝试使用gradle构建我的
android项目,但我一直在收到这条失败的消息,我真的可以理解,当我不使用gradle时,一切都工作顺利,我做错了什么?
:Wrap:dexDebug UNEXPECTED TOP-LEVEL EXCEPTION: java.lang.IllegalArgumentException: method ID not in [0,0xffff]: 65536 at com.android.dx.merge.DexMerger$6.updateIndex(DexMerger.java:501) at com.android.dx.merge.DexMerger$IdMerger.mergeSorted(DexMerger.java:276) at com.android.dx.merge.DexMerger.mergeMethodIds(DexMerger.java:490) at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:167) at com.android.dx.merge.DexMerger.merge(DexMerger.java:188) at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439) at com.android.dx.command.dexer.Main.runMonoDex(Main.java:287) at com.android.dx.command.dexer.Main.run(Main.java:230) at com.android.dx.command.dexer.Main.main(Main.java:199) at com.android.dx.command.Main.main(Main.java:103) Failed FAILURE: Build Failed with an exception. * What went wrong: Execution Failed for task ':Wrap:dexDebug'. > com.android.ide.common.internal.LoggedErrorException: Failed to run command: /Users/nirkeren/Downloads/adt-bundle-mac-x86_64-20131030/sdk/build-tools/19.0.3/dx --dex --output /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/dex/debug /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/classes/debug /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/dependency-cache/debug /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/pre-dexed/debug/activation-371528ff37ca00b95f4aaa30e7ada077808b4066.jar /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/pre-dexed/debug/additionnal-cbe08f392e3489e0bbc657eaa6e1b2c578c8c63a.jar /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/pre-dexed/debug/aws-android-sdk-1.7.1.1-1063abd88670acb74ffa18e83bed84e1185d156e.jar /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/pre-dexed/debug/classes-00b425e022f3e5825d218bf8230a3518488661ad.jar /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/pre-dexed/debug/classes-1536774be9f5f226247f33ff39444641cbae5f17.jar /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/pre-dexed/debug/classes-319df0e8b970ed8444fa4ad2a35d7b04d8635cf7.jar /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/pre-dexed/debug/classes-3a528328da2ecd26bde330cd6e96a93681e37443.jar /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/pre-dexed/debug/classes-88cca99f18ad79854e456d941016a7ba2d89778b.jar /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/pre-dexed/debug/classes-b427cc929fd1399dd3b95eb4f41a07465f532aaf.jar /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/pre-dexed/debug/classes-b7ec143e0b6817ac519f67d77d80b2574ceaac79.jar /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/pre-dexed/debug/crashlytics-a9be38ef9142a13510daa326a3e74e79ec26fe81.jar /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/pre-dexed/debug/google-api-client-1.15.0-rc-e5d0bfc007123ab793084359d1ef33a23786b1cc.jar /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/pre-dexed/debug/google-api-client-android-1.15.0-rc-91914619bb0c2177957554eee1e41988a12b4111.jar /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/pre-dexed/debug/google-api-services-drive-v2-rev76-1.15.0-rc-9fc7b1dbf3fa9980bb1471a02e67a59ea7b0e7e4.jar /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/pre-dexed/debug/google-http-client-1.15.0-rc-c609d62345e69e29cff2e79286c99b2287dc1935.jar /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/pre-dexed/debug/google-http-client-android-1.15.0-rc-219670662f5d9c8793501be852143a90ad8bcfc9.jar /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/pre-dexed/debug/google-http-client-gson-1.15.0-rc-2bc2a42d04283a6e31550ba6fb50a545a295e1d7.jar /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/pre-dexed/debug/google-oauth-client-1.15.0-rc-3de236b42e6497978cf52f309ed16c0dd47a7e4a.jar /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/pre-dexed/debug/google-play-services-d4c8a0bc9c8586e19cc569471ba95580ff827f24.jar /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/pre-dexed/debug/gson-2.1-5dd6330840355abbdb328e202fb7a1b601c11625.jar /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/pre-dexed/debug/httpclient-4.0.1-6d6f0a4ccfe934c72fcd285cd0bd138903838075.jar /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/pre-dexed/debug/httpcore-4.0.1-651bf829da8a88ebcba183426bdc2a5816a8a8f8.jar /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/pre-dexed/debug/jsr305-1.3.9-17a8eef10544db30421f617a1a74033dc44e0b5a.jar /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/pre-dexed/debug/libGoogleAnalyticsServices-20f33d61149fc3986571664bce4d5a71b7375d77.jar /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/pre-dexed/debug/library-2.4.0-cf8b4e3adb01d32f9c0a19763d14e0d5a6fc58cb.jar /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/pre-dexed/debug/mail-368bf8fea3a96aaffa7fe8eb7a39f1c975584527.jar /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/pre-dexed/debug/opencsv-2.3-60231b26d86a13ba9a7e4d523848b462313d909f.jar /Users/nirkeren/projects/ONDiGO_1_1_0/Wrap/build/pre-dexed/debug/support-v4-19.1.0-00876ab3fdbf97f4dfe545f08a39e533888e15b1.jar Error Code: 2 Output: UNEXPECTED TOP-LEVEL EXCEPTION: java.lang.IllegalArgumentException: method ID not in [0,0xffff]: 65536 at com.android.dx.merge.DexMerger$6.updateIndex(DexMerger.java:501) at com.android.dx.merge.DexMerger$IdMerger.mergeSorted(DexMerger.java:276) at com.android.dx.merge.DexMerger.mergeMethodIds(DexMerger.java:490) at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:167) at com.android.dx.merge.DexMerger.merge(DexMerger.java:188) at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439) at com.android.dx.command.dexer.Main.runMonoDex(Main.java:287) at com.android.dx.command.dexer.Main.run(Main.java:230) at com.android.dx.command.dexer.Main.main(Main.java:199) at com.android.dx.command.Main.main(Main.java:103) * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD Failed