0

When I run in my device its working properly But while building apk in android studio its showing error:

Build APK: Errors while building APK. You can find the errors in the 'Messages' view

Here is the error:

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

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Praveenkumar
  • 31
  • 1
  • 10

2 Answers2

0

problem is solved after i removed jar file from my project. it seems that one of the jar files inside my project was using an google play services

Praveenkumar
  • 31
  • 1
  • 10
0

I had the same problem this morning. You've likely hit the upper limit on how many methods you can have in a dex file (by having lots of dependencies).

The solution is to enable multiDex; This other SO answer on the topic explains it far better than I ever could.

Alex Meuer
  • 1,621
  • 3
  • 26
  • 37