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?
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
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.!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.