NoClassDefFoundError on runtime only when I add some totally unrelated compile dependencies

So I have this Android app I’ve been working on for over six months. It is compiling just fine, and works just fine. The problem happens when I add a couple new compile lines to the gradle dependencies because of another library I’m going to add (not added yet). As soon as I add those compile lines I get a runtime crash NoClassDefFoundError for classes which are totally unrelated. Also depending on which module I add the compile lines to, the class not found happens on a different class.

These are the compile lines I’m adding:

compile ('org.apache.xmlrpc:xmlrpc-client:3.1.3') {
        exclude group: 'xml-apis'
compile ('') {
        exclude group: 'xml-apis'

This is one of the crashes I’ve seen:


This is another one of the crashes when I moved the compile lines to a different module:

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/dropbox/client2/session/AppKeyPair;

Keep in mind that this is an app that works just fine without those two compile commands, including the functionality that uses the classes that the errors are for.

This is a multidex app, not sure if that makes a difference.


EDIT: Gradle 2.4