Android compilation, too many methods

when I compile my Android package: it prints

Problem with recording: Too many methods: 65544; max - 65536. By packaging: ... ...

This is because I am defining too many built-in methods in my class. How can I solve this problem?

+4
source share
2 answers

This clearly indicates that your class is too complex and needs to be reorganized into a few smaller units.

-3
source

One of Google’s solutions uses multiple DEX files.

http://android-developers.blogspot.com/2011/07/custom-class-loading-in-dalvik.html

From my comment in another Konstatin solution, there are times when you will run dedicated 64K methods.

A profile to remove some third-party library method calls that you are not using is a workaround.

+1
source

Source: https://habr.com/ru/post/1440731/


All Articles