After upgrading to Android Studio 3.1, I started to get following error during build. Project uses multidex and DX is enabled by default as you would notice in the error. I
In y case I've resolved issue by
implementation 'com.android.support:appcompat-v7:26.0.0'
to
implementation 'com.android.support:appcompat-v7:27.1.1'