title: Why does the Flutter build failed with the error Could not resolve all files for configuration ':app:debugRuntimeClasspath'
body: <p>I wanted to use the flutter <a href="https://pub.dartlang.org/packages/video_player#-readme-tab-" rel="nofollow noreferrer">video_payer</a> api for displaying a video from the network in my app. I upgraded to the latest version and now, my app won't build. The following error is being displayed-</p>
  
  <pre><code>PBI: {"kind":"error","text":"Invoke-customs are only supported starting with Android O (--min-api 26)","sources":[{}],"tool":"D8"}
  </code></pre>
  
  <p>AGPBI: {"kind":"error","text":"Invoke-customs are only supported starting with Android O (--min-api 26)","sources":[{}],"tool":"D8"}
  AGPBI: {"kind":"error","text":"Invoke-customs are only supported starting with Android O (--min-api 26)","sources":[{}],"tool":"D8"}
  AGPBI: {"kind":"error","text":"Default interface methods are only supported starting with Android N (--min-api 24): void com.google.android.exoplayer2.Player$EventListener.onLoadingChanged(boolean)","sources":[{}],"tool":"D8"}
           *********************************************************
  WARNING: This version of video_player will break your Android build if it or its dependencies aren't compatible with AndroidX.
           See  for more information on the problem and how to fix it.
           This warning prints for all Android build failures. The real root cause of the error may be unrelated.
           *********************************************************
  AGPBI: {"kind":"error","text":"Default interface methods are only supported starting with Android N (--min-api 24): void com.google.android.exoplayer2.Player$EventListener.onLoadingChanged(boolean)","sources":[{}],"tool":"D8"}</p>
  
  <p>FAILURE: Build failed with an exception.</p>
  
  <ul>
  <li>What went wrong:
  Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
  
  <blockquote>
    <p>Failed to transform file 'classes.jar' to match attributes {artifactType=android-dex, dexing-is-debuggable=true, dexing-min-sdk=16} using transform DexingTransform
    Error while dexing.
     The dependency contains Java 8 bytecode. Please enable desugaring by adding the following to build.gradle
     android {
         compileOptions {
             sourceCompatibility 1.8
             targetCompatibility 1.8
         }
     }
     See <a href="https://developer.android.com/studio/write/java8-support.html" rel="nofollow noreferrer">https://developer.android.com/studio/write/java8-support.html</a> for details. Alternatively, increase the minSdkVersion to 26 or above.</p>
  </blockquote></li>
  </ul>
  
  <blockquote>
    <p>Failed to transform file 'classes.jar' to match attributes {artifactType=android-dex, dexing-is-debuggable=true, dexing-min-sdk=16} using transform DexingTransform
    Error while dexing.
         The dependency contains Java 8 bytecode. Please enable desugaring by adding the following to build.gradle
         android {
             compileOptions {
                 sourceCompatibility 1.8
                 targetCompatibility 1.8
             }
         }
         See <a href="https://developer.android.com/studio/write/java8-support.html" rel="nofollow noreferrer">https://developer.android.com/studio/write/java8-support.html</a> for details. Alternatively, increase the minSdkVersion to 26 or above.</p>
    
    <p>Failed to transform file 'classes.jar' to match attributes {artifactType=android-dex, dexing-is-debuggable=true, dexing-min-sdk=16} using transform DexingTransform
    Error while dexing.
         The dependency contains Java 8 bytecode. Please enable desugaring by adding the following to build.gradle
         android {
             compileOptions {
                 sourceCompatibility 1.8
                 targetCompatibility 1.8
             }
         }
         See <a href="https://developer.android.com/studio/write/java8-support.html" rel="nofollow noreferrer">https://developer.android.com/studio/write/java8-support.html</a> for details. Alternatively, increase the minSdkVersion to 26 or above.</p>
    
    <p>Failed to transform file 'classes.jar' to match attributes {artifactType=android-dex, dexing-is-debuggable=true, dexing-min-sdk=16} using transform DexingTransform
    Error while dexing.
    Failed to transform file 'classes.jar' to match attributes {artifactType=android-dex, dexing-is-debuggable=true, dexing-min-sdk=16} using transform DexingTransform
    Error while dexing.</p>
  </blockquote>
  
  <ul>
  <li><p>Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.</p></li>
  <li><p>Get more help at <a href="https://help.gradle.org" rel="nofollow noreferrer">https://help.gradle.org</a></p></li>
  </ul>
  
  <p>BUILD FAILED in 12s
  Finished with error: Gradle task assembleDebug failed with exit code 1</p>
  
  <p>I can't figure out the issue. What seems to be the problem?</p>