Search code examples
androidr.java-filedexandroid-multidex

Does the R.java file declarations consume spaces from the 64K limit?


I wonder if does the R.java file declarations/assignations consume spaces from the 64K methods limit?

Maybe because of the set/get of the variables?

Thanks in advance.


Solution

  • The R class and its subclasses don't have normal methods, but they do typically have a no-op constructor method, and possibly also a static constructor method which is used to initialize some of the fields that can't be initialized statically in the dex file.

    So, assuming you have roughly 10 classes counting the R class and its various subclasses (R.string, R.layout, etc.), you'll end up with about 10-20 additional method references.