I would like to change the order of libraries in the classpath for Android Studio. I am trying to run unit tests with JUnit 4 from within the IDE
You have to modify the project .iml file to have the JDK as the last entry like the following:
.iml
For a full working example see Robolectric's deckard-gradle sample.