Reputation: 6880
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?
Upvotes: 2
Views: 5114
Reputation: 305
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.!
Upvotes: 0
Reputation: 2692
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
Upvotes: 0