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
I also faced the same problem just a while ago. In my case the third party library used the older AccessibilityServiceInfoCompat version v4 22 and i already updated to newer one v4 28 so both support library classes clashed