I'm working on developing a medical records system using OpenMRS as a backend for Android. OpenMRS is dependent on some seriously heavyweight libraries, including Hibernate and Spring.
"Dexing" the entire OpenMRS application generates a file that's too big even for the Android classes.dex file format (this size limit is already well-documented). To get around this, I'm currently working at creating multiple dex files from the dependencies and loading them during runtime using Android's dex classloader.
Because of the way the mobile version of the server will be used in practice, the actual processing demands will be very low despite the huge dependencies. I'm not trying to run an enterprise server on my phone here.
Before I spend weeks more of my time trying to engineer this, I just wanted to ask the developer community: is this strategy just a pipe dream? If I load up all these libraries, will the entire binary get 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 I'm missing here?