I am working on a medical records system using OpenMRS as a backend for Android. OpenMRS depends on some seriously heavy libraries, including Hibernate and Spring.
"Dexing" the entire OpenMRS application generates a file that is too large even for the Android classes.dex file format (this size limit is already well documented). To get around this, I am currently working on creating multiple dex files from dependencies and loading them at runtime using the Android dex class loader.
Due to the fact that the mobile version of the server will be used in practice, the actual processing requirements will be very low, despite the huge dependencies. I am not trying to start the corporate server on my phone here.
Before I spent more than a week trying to predict this, I just wanted to ask the developer community: is this strategy just a dream? If I download all these libraries, will the whole binary file be loaded into RAM and just break the system? Is there a good way to optimize such an application? Is there some obvious problem or solution that I'm missing here?
source share