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've had the same issue. In my project, I had the following dependencies :
For legacy reasons, the appcompat was fetched from the Google Maven repo, whereas the android-support was a local .jar.
When I figured out this, and replaced this local reference with a maven reference, it just solved my build issue.
Here's the diff of my app/build.gradle :