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
I was able to solve the problem in my react native project by simply adding
configurations { all*.exclude group: 'com.android.support', module: 'support-compat' all*.exclude group: 'com.android.support', module: 'support-core-ui' }
at the end of my android\app\build.gradle file