After migrating from Android Studio 3.0 (Canary 5) to Android Studio 3.0 (Beta 1), and moving to latest gradle , i.e. \'com.android.tools.build:gradle:3.0.0-beta1\'
\'com.android.tools.build:gradle:3.0.0-beta1\'
Need to add the following as well:
compile 'com.android.support:multidex:1.0.3'
After adding the above line, it worked for me in addition to the above answer