If I run gradle assembleDebug
from the command line, I am suddenly getting this error:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dx.util.DexEx
I had the same problem and it seems that my app had too many methods because of the libraries: http://developer.android.com/tools/building/multidex.html
Solved it with:
android {
defaultConfig {
...
multiDexEnabled = true
}
}
More here Error:Execution failed for task ':app:dexDebug'. > comcommand finished with non-zero exit value 2