0

I include compile 'com.specyci:residemenu:1.6+' library in my project. And i Have an error :

Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
    C:\Users\...\AppData\Local\Android\sdk\build-tools\22.0.0\dx.bat --dex --no-optimize --output C:\projects\android-customer\app\build\intermediates\dex\debug --input-list=C:\projects\android-customer\app\build\intermediates\tmp\dex\debug\inputList.txt
Error Code:
    2
Output:
    UNEXPECTED TOP-LEVEL EXCEPTION:
    com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
        at com.android.dx.merge.DexMerger$6.updateIndex(DexMerger.java:502)
        at com.android.dx.merge.DexMerger$IdMerger.mergeSorted(DexMerger.java:277)
        at com.android.dx.merge.DexMerger.mergeMethodIds(DexMerger.java:491)
        at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:168)
        at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
        at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)
        at com.android.dx.command.dexer.Main.runMonoDex(Main.java:303)
        at com.android.dx.command.dexer.Main.run(Main.java:246)
        at com.android.dx.command.dexer.Main.main(Main.java:215)
        at com.android.dx.command.Main.main(Main.java:106)

I tried

packagingOptions {
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/inputList'
    }

but this not help. How do I fix this?

ip696
  • 6,574
  • 12
  • 65
  • 128

1 Answers1

0

You have a problem with this file C:\projects\android-customer\app\build\intermediates\tmp\dex\debug\inputList.txt, possibly there is format mismatch. Try to open this file and resave it once again. Clean project after. Hope it helps.

UPDATE

Try also add it to your Gradle

android {
    defaultConfig {
       ...
       multiDexEnabled = true
    }
}

Source

Another link and one more

Community
  • 1
  • 1
Yurets
  • 3,999
  • 17
  • 54
  • 74
  • I clean project. I know that problem with this file How do I fix this? – ip696 Apr 24 '15 at 05:29
  • try to open and save it as new file in txt format, I saw similar issues with pictures, there needed to resave it again, because was wrong format. And check please links I gave you, there are could be solution as well. – Yurets Apr 24 '15 at 05:32
  • multiDexEnabled = true not helped((((( – ip696 Apr 24 '15 at 05:34
  • check this out http://stackoverflow.com/questions/27377080/after-update-of-as-to-1-0-getting-method-id-not-in-0-0xffff-65536-error-i possible you reached the amount of methods you may include in your project. I remember allowed amount is nearly 65 000. So project will not accept any libraries anymore. Try also to add this library from google, which Google released, might it can help. Everything described in the link above – Yurets Apr 24 '15 at 05:36
  • I do not think that this is due to the overflow methods. I installed the plugin and see that there is not exactly 65000 – ip696 Apr 24 '15 at 05:42