If I run gradle assembleDebug from the command line, I am suddenly getting this error:
gradle assembleDebug
UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dx.util.DexEx
Deleting all files from Gradle cache fixed my problem.
on Linux:
rm -rf ~/.gradle/caches/*