Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DexDebug error #141

Open
AndyOHart opened this issue Jul 2, 2015 · 8 comments
Open

DexDebug error #141

AndyOHart opened this issue Jul 2, 2015 · 8 comments

Comments

@AndyOHart
Copy link

Hi.
I get around 8 or so issues relating to Dependency, for example:

Warning:Dependency org.apache.httpcomponents:httpclient:4.3.5 is ignored for debug as it may be conflicting with the internal version provided by Android.

Also I noticed that JReddit implements an ridiculous number of External Libraries.
I think this is the main reason for my error, which is:

Error:Execution failed for task ':app:dexDebug'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2

How could I resolve this? Is it something that could be fixed with proguard?

@sfat
Copy link

sfat commented Jul 2, 2015

hey @AndyOHart , can you check out this guy and see if you experience the same issues afterwards? https://stackoverflow.com/questions/29016282/jreddit-and-java-lang-noclassdeffounderror-error/30196299#30196299 I've created in /examples in this repo where I have configured a dummy android app with the same configuration in gradle.

@AndyOHart
Copy link
Author

It got rid of the dependency issues but I still can't run it.
I get this:

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)
Error:Execution failed for task ':app:dexDebug'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2

@sfat
Copy link

sfat commented Jul 2, 2015

I think this might be the problem.
https://stackoverflow.com/questions/27377080/after-update-of-as-to-1-0-getting-method-id-not-in-0-0xffff-65536-error-i
http://www.mutualmobile.com/posts/dex-64k-limit-not-problem-anymore-almost
Not really an android expert, but this thing seems to suck as far as I can see

@AndyOHart
Copy link
Author

Why is there so many methods? The project works fine without including the JReddit library. It's only when I add that in I reach the dex limit

@sfat
Copy link

sfat commented Jul 2, 2015

Probably it takes into consideration methods from the jreddit library or something like that. I can't really explain, I am not an android developer myself, sorry.

@AndyOHart
Copy link
Author

No worries, appreciate the help, hopefully some other Android dev has ran into it and fixed it.

@sfat
Copy link

sfat commented Jul 2, 2015

Have you tried the suggestion of switching to MultiDex, as suggested from the links I provided?

@AndyOHart
Copy link
Author

That did fix the error yeah, thanks. I'm just not sure if there is a better way of doing it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants