title: Error: Invoke-customs are only supported starting with Android O (--min-api 26)
body: <p>I have recently started learning how to program Android devices via Android Studio. My first app was running fine until I upgraded to Android Studio 3.4 this morning.</p>
  <p>I'm getting the following compilation errors:</p>
  <blockquote>
  <p>Caused by: com.android.builder.dexing.DexArchiveBuilderException: Failed to process C:\Users\Technical.gradle\caches\transforms-2\files-2.1\4f3f8638c6a9f961dae488a0387efb6b\jars\classes.jar</p>
  <p>Caused by: com.android.builder.dexing.DexArchiveBuilderException: Error while dexing.</p>
  <p>Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete</p>
  <p>Caused by: com.android.tools.r8.utils.AbortException: Error: Invoke-customs are only supported starting with Android O (--min-api 26)</p>
  </blockquote>
  <p>Is there a way of reverting back to my previous version of Android Studio?</p>
  <p>If not what has changed in the new version that is causing a failure in creating the dex file?</p>
  <p>I have tried adding <code>android.enableD8=true</code> in <code>gradle.properties</code> as suggested <a href="https://stackoverflow.com/questions/47137483/android-studio-3-0-dexarchivebuilderexception">here</a> but no luck.</p>
  <hr />
  <p><strong>EDIT #1:</strong></p>
  <p>Have also tied adding <code>multiDexEnabled true</code> to the default configuration in the app <code>build.gradle</code> file but the same compilation errors persist.</p>
  <p>That build file in full...</p>
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 28
      defaultConfig {
          applicationId &quot;qdivision.org.qrtracker&quot;
          minSdkVersion 15
          targetSdkVersion 28
          versionCode 1
          versionName &quot;1.0&quot;
          testInstrumentationRunner &quot;android.support.test.runner.AndroidJUnitRunner&quot;
          multiDexEnabled true
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation 'com.android.support:appcompat-v7:28.0.0'
      implementation 'com.android.support.constraint:constraint-layout:1.1.3'
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'com.android.support.test:runner:1.0.2'
      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
      implementation 'com.github.felHR85:UsbSerial:6.0.5'
  }
  </code></pre>