According to the Java Virtual Machine specification,
the code of a method must not be bigger than 65536 bytes.
I suppose your Activity
having 4300+ Lines of code is crossing this Limit.
Also, as @Mukul pointed out, It is not a good practice to make a single class with such a large number of lines of code. Obviously, there could be certain cases where it is really necessary, but they still can be split into different classes.
Try and figure out the methods or variables which you feel can be moved to another class and recompile the project.
For Ex:
- Move all the
final
variables to a Constants.java
class.
- Move all commonly used
methods
to Utils.java
class.
- You can create another static class holding all the static methods separately.
Although there could be better ways than the examples above, however, such practice will help you minimize the bytecode of a single class and will help you maintain your code better.