I'm trying to run an espresso test on MultiDex app and am failing with the below error
Error:Execution failed for task > :transformClassesWithMultidexlistForDebugAndroidTest'. java.io.IOException: The output jar is empty. Did you specify the proper > '-keep' options?
Here's the relevant section in my build.gradle
defaultConfig {
...
// Enabling multidex support.
multiDexEnabled true
dexOptions {
jumboMode true
}
testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
}
I do have a workaround which is to:
- comment out 'testInstrumentationRunner' line
- Build the test
- Uncomment the line
- Run the test
This seems to work, but I need to re-do this any time I'm changing my test code, which is a major pain.
Could fine similar error online, but nothing specific to my case...
I am building using Android studio