1

I imported my project from existent code. I didn't do any modification but when I build the application there is the error:

:XXXXPlayer:transformClassesWithInstantRunForDebug FAILED FAILURE: Build failed with an exception.

*What went wrong: Execution failed for task ':xxxxPlayer:transformClassesWithInstantRunForDebug'.

Method code too large!

Any idea?

Maxim Pontyushenko
  • 2,983
  • 2
  • 25
  • 36
Rjaibi Mejdi
  • 6,820
  • 3
  • 21
  • 26

2 Answers2

1

You should break your function into different functions. It is really bad design to create one large method.

Error is thrown because there is a 64K byte-code size limit on a method in Java.

There could be helpful http://chrononsystems.com/blog/method-size-limit-in-java

Also checkout solution proposed in this answer "Code too large" compilation error in Java

Community
  • 1
  • 1
Bipin Bhandari
  • 2,694
  • 23
  • 38
0

Error is producing because you have added many dependencies.

First a java class name what you want for example ApplicationDelegate and extends with MultiDexApplication. Open android manifest file add this class name 'android:name=".ApplicationDelegate"' in Application Tag.!