-1

How to solve this?

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

com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536

JAAD
  • 12,349
  • 7
  • 36
  • 57
  • As a side note, if you're compiling the whole google play services library, you probably don't need all of it and you can just compile `com.google.android.gms:play-services-maps:` – Benito Bertoli Nov 28 '16 at 13:12
  • I did add the latest play-services version i.e. 10.0.0, still nothing works at the moment, I'm trying other methods. – Shreyasta Samal Nov 28 '16 at 13:27
  • Benito Bertoli ,I'm getting these comments after the so called suggestions that you gave , which doesn't work at all and I'm getting these new errors after you marked my question as duplicate:java.util.concurrent.TimeoutException: Preview timed out while rendering the layout. This typically happens when there is an infinite loop or unbounded recursion in one of the custom views. at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.(ZipFile.java:219) at java.util.zip.ZipFile.(ZipFile.java:149) at java.util.zip.ZipFile.(ZipFile.java:163) – Shreyasta Samal Nov 28 '16 at 13:30
  • Got any reason for this ?? – Shreyasta Samal Nov 28 '16 at 13:31
  • `com.android.dex.DexIndexOverflowException` is solved by either using multidex or reducing the method count below 65k. Your question was closed as a duplicate because this has been answered before. My comment was a friendly suggestion regarding the unnecessary use of the whole google play services library (in case you were), which greatly increases the method count. If you are now facing different issues, I encourage you to ask a new question. – Benito Bertoli Nov 28 '16 at 14:10
  • Yes after solving 1 error and another creeps in. My app was working so well and I was about to launch in app store and now after upgrading the Android Studio ,nothing works, it just shut downs ,so I'm trying my best to resolve every error ,but I'm back to ground zero, and all the hard work from the past 5 months has gone down the drains. Let's see what happens. – Shreyasta Samal Nov 28 '16 at 14:50

1 Answers1

0

You have reached to 65k method limit.You either remove some dependencies which are not being used or use multidex.

https://developer.android.com/studio/build/multidex.html

Sunny
  • 14,522
  • 15
  • 84
  • 129