title: App crashes with ClassNotFoundException after updating Android Studio to 2.3.1 and gradle to
body: <p>I updated Android studio yesterday to 2.3.1 and gradle wrapper to gradle-3.3-all. After updating my app stopped building properly and keep crashing after installing in device.</p>
  
  <p>Stacktrace is</p>
  
  <pre><code>04-16 19:37:19.436 ? E/DynamiteModule: Failed to load module descriptor class: Didn't find class "com.google.android.gms.dynamite.descriptors.com.google.firebase.auth.ModuleDescriptor" on path: DexPathList[[zip file "/data/app/tk.swapnilUtilities.myApp-1.apk"],nativeLibraryDirectories=[/data/app-lib/tk.swapnilUtilities.myApp-1, /vendor/lib, /system/lib]]
  04-16 19:37:23.620 ? E/CrashlyticsCore: Failed to execute task.
                                          java.util.concurrent.TimeoutException
                                              at java.util.concurrent.FutureTask.get(FutureTask.java:173)
                                              at com.crashlytics.android.core.CrashlyticsBackgroundWorker.submitAndWait(CrashlyticsBackgroundWorker.java:41)
                                              at com.crashlytics.android.core.CrashlyticsController.handleUncaughtException(CrashlyticsController.java:285)
                                              at com.crashlytics.android.core.CrashlyticsController$5.onUncaughtException(CrashlyticsController.java:269)
                                              at com.crashlytics.android.core.CrashlyticsUncaughtExceptionHandler.uncaughtException(CrashlyticsUncaughtExceptionHandler.java:30)
                                              at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
                                              at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
                                              at dalvik.system.NativeStart.main(Native Method)
  04-16 19:37:23.622 ? E/AndroidRuntime: FATAL EXCEPTION: main
                                         java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{tk.swapnilUtilities.myApp/tk.swapnilUtilities.myApp.ui.ScrMainActivity}: java.lang.ClassNotFoundException: Didn't find class "tk.swapnilUtilities.myApp.ui.ScrMainActivity" on path: DexPathList[[zip file "/data/app/tk.swapnilUtilities.myApp-1.apk"],nativeLibraryDirectories=[/data/app-lib/tk.swapnilUtilities.myApp-1, /vendor/lib, /system/lib]]
                                             at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2269)
                                             at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2395)
                                             at android.app.ActivityThread.access$600(ActivityThread.java:162)
                                             at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
                                             at android.os.Handler.dispatchMessage(Handler.java:107)
                                             at android.os.Looper.loop(Looper.java:194)
                                             at android.app.ActivityThread.main(ActivityThread.java:5371)
                                             at java.lang.reflect.Method.invokeNative(Native Method)
                                             at java.lang.reflect.Method.invoke(Method.java:525)
                                             at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
                                             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
                                             at dalvik.system.NativeStart.main(Native Method)
                                          Caused by: java.lang.ClassNotFoundException: Didn't find class "tk.swapnilUtilities.myApp.ui.ScrMainActivity" on path: DexPathList[[zip file "/data/app/tk.swapnilUtilities.myApp-1.apk"],nativeLibraryDirectories=[/data/app-lib/tk.swapnilUtilities.myApp-1, /vendor/lib, /system/lib]]
                                             at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53)
                                             at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
                                             at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
                                             at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
                                             at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2260)
                                             at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2395) 
                                             at android.app.ActivityThread.access$600(ActivityThread.java:162) 
                                             at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364) 
                                             at android.os.Handler.dispatchMessage(Handler.java:107) 
                                             at android.os.Looper.loop(Looper.java:194) 
                                             at android.app.ActivityThread.main(ActivityThread.java:5371) 
                                             at java.lang.reflect.Method.invokeNative(Native Method) 
                                             at java.lang.reflect.Method.invoke(Method.java:525) 
                                             at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833) 
                                             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600) 
                                             at dalvik.system.NativeStart.main(Native Method) 
  </code></pre>
  
  <p>I am using kotlin version '1.1.1', 'com.android.tools.build:gradle:2.3.1', 'com.google.gms:google-services:3.0.0', compileSdkVersionValue = 25, buildToolsVersionValue = '25.0.2'</p>
  
  <p>I tried installing the app using gradlew installMockDebug but it fails to run. 
  I disabled instant run as mentioned in other posts but no help. Any ideas how to fix it?</p>
  
  <p>EDIT:
  My build.gradle file is:</p>
  
  <pre><code>buildscript {
      repositories {
          maven { url 'https://maven.fabric.io/public' }
      }
  
      dependencies {
          classpath 'io.fabric.tools:gradle:1.+'
      }
  }
  apply plugin: 'com.android.application'
  apply plugin: 'io.fabric'
  
  repositories {
      maven { url 'https://maven.fabric.io/public' }
  }
  
  apply plugin: 'kotlin-android'
  
  android {
      compileSdkVersion rootProject.ext.compileSdkVersionValue
      buildToolsVersion rootProject.ext.buildToolsVersionValue
  
      defaultConfig {
          applicationId "tk.swapnilUtilities"
          minSdkVersion 14
          targetSdkVersion rootProject.ext.compileSdkVersionValue
          versionCode 1
          versionName "0.0.1"
  
          // Enabling multidex support.
          multiDexEnabled true
          resConfigs "en", "hi"
  
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
          /*jackOptions {
              enabled true
          }*/
      }
  
      buildTypes {
          debug {
              testCoverageEnabled = true
          }
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  
      productFlavors {
          mock {
          }
          api {
  
          }
      }
  
      dataBinding {
          enabled true
      }
  
      useLibrary 'org.apache.http.legacy'
  
      packagingOptions {
          exclude 'META-INF/DEPENDENCIES'
          exclude 'META-INF/NOTICE'
          exclude 'META-INF/LICENSE'
          exclude 'META-INF/LICENSE.txt'
          exclude 'META-INF/NOTICE.txt'
          exclude 'LICENSE.txt'
      }
      /*compileOptions {
          sourceCompatibility JavaVersion.VERSION_1_8
          targetCompatibility JavaVersion.VERSION_1_8
      }*/
  }
  
  dependencies {
      compile fileTree(include: ['*.jar'], dir: 'libs')
      compile('org.apache.httpcomponents:httpmime:4.3') {
          exclude group: 'org.apache.httpcomponents', module: 'httpclient'
      }
      compile('org.apache.httpcomponents:httpcore:4.4.1') {
          exclude group: 'org.apache.httpcomponents', module: 'httpclient'
      }
      compile rootProject.ext.recyclerview
      compile 'com.github.zhaokaiqiang.klog:library:1.1.0'
      compile 'com.google.code.gson:gson:2.4'
      compile 'commons-io:commons-io:1.3.2'
      compile 'com.android.support.test.espresso:espresso-idling-resource:2.2.2'
  
      //Testing
      testCompile('junit:junit:4.12', {
          exclude group: 'com.android.support', module: 'support-annotations'
      })
      testCompile 'org.mockito:mockito-core:1.10.19'
      // Android runner and rules support
      androidTestCompile('com.android.support.test:runner:0.5', {
          exclude group: 'com.android.support', module: 'support-annotations'
      })
      androidTestCompile 'com.android.support.test:rules:0.5'
      // Espresso support
      androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
          exclude group: 'com.android.support', module: 'support-annotations'
      })
      // add this for intent mocking support
      androidTestCompile 'com.android.support.test.espresso:espresso-intents:2.2.2'
      androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.0') {
          exclude group: 'com.android.support', module: 'appcompat'
          exclude group: 'com.android.support', module: 'support-v4'
          exclude module: 'recyclerview-v7'
      }
      testCompile 'org.mockito:mockito-all:1.10.19'
      testCompile 'org.powermock:powermock-api-mockito:1.6.2'
      // Firebase Authentication
      compile 'com.google.firebase:firebase-auth:9.0.2'
      compile 'com.google.firebase:firebase-database:9.0.2'
      compile 'com.firebaseui:firebase-ui-database:0.4.1'
      compile 'com.google.firebase:firebase-storage:9.0.2'
      //RX
      //compile 'io.reactivex:rxjava:1.0.+'
      //compile 'io.reactivex:rxandroid:0.23.+'
      //compile 'io.reactivex.rxjava2:rxjava:2.0.7'
      /*compile 'io.reactivex.rxjava2:rxandroid:2.0.1'*/
      compile rootProject.ext.rxJava
      compile rootProject.ext.rxAndroid
      // Google Sign In SDK (only required for Google Sign In)
      compile 'com.google.android.gms:play-services-auth:9.0.2'
      //Kotlin
      compile "org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}"
      //compile 'com.firebaseui:firebase-ui-storage:0.6.0'
      //compile 'com.firebaseui:firebase-ui-storage:1.0.0'
      compile 'com.github.bumptech.glide:glide:3.7.0'
      compile project(':pickphotos')
      compile('com.crashlytics.sdk.android:crashlytics:2.6.7@aar') {
          transitive = true;
      }
  }
  configurations.all {
      resolutionStrategy.force rootProject.ext.annotations
  }
  apply plugin: 'com.google.gms.google-services'
  apply plugin: 'kotlin-android-extensions'
  </code></pre>