error: code too large android studio

1

By entering a modification in the application I missed this error. I imagine that I must reduce code or something like that so it says the error but I do not know exactly what type, if there are too many variables or calculations or what happens. The truth is that I need all the code and it has left me crazed when I jump the error that I had never given. How can I solve it?

    
asked by miklotov 14.04.2017 в 16:49
source

2 answers

0

A method should not be greater than 64KB (65536 bytes), you should consider modulating the code you have inside and adding it to other methods that I called your method, it is not common to have such a great method!

If anyone thinks of using this solution, it can not be done with Android Studio: link

I recommend you optimize your code.

    
answered by 14.04.2017 / 18:17
source
0

A file in bytescodes can only occupy 64kb of memory. Even if you have exceeded the limit you do not have to pre-accept part of your code.

Surely you can organize better, try to separate it into more classes and functions in different files and you will not have a problem.

If you attach your code we can help you organize it better. Greetings.

    
answered by 14.04.2017 в 17:30