title: Flutter: Gradle task assembleDebug failed with exit code 1
body: <p>So, I have made an App with Flutter and it's even published to Playstore. Recently, I am working on an update and by mistake, I added a plugin (interactive_webview) which doesn't support AndroidX yet. After seeing the error, I removed that plugin and did flutter clean. But since, then I am getting this error:</p>
  
  <pre><code>Launching lib\main.dart on RMX1801 in debug mode...
  Launching lib/main.dart on RMX1801 in debug mode...
  Initializing gradle...                                              0.7s
  Resolving dependencies...                                           5.0s
  registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
  registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
  registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
  Running Gradle task 'assembleDebug'...
  Running Gradle task 'assembleDebug'... Done                        20.3s
  Gradle task assembleDebug failed with exit code 1
  </code></pre>
  
  <blockquote>
    <ul>
    <li>I had migrated to AndroidX months back.</li>
    <li>I am using the latest version of flutter.</li>
    <li><p>App's compiled and targeted SDK is 28.</p></li>
    <li><p>gradle-wrapper.properties has    distributionUrl=https://services.gradle.org/distributions/gradle-5.1.1-all.zip</p></li>
    </ul>
  </blockquote>
  
  <p>flutter run -v error:</p>
  
  <pre><code>[   +1 ms] 255 actionable tasks: 6 executed, 249 up-to-date
  [ +518 ms] Running Gradle task 'assembleDebug'... (completed in 9.9s)
  [   +6 ms] "flutter run" took 16,722ms.
  [   +1 ms] "flutter run" took 16,722ms.
  Gradle task assembleDebug failed with exit code 1
  
  #0      throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
  #1      _buildGradleProjectV2 (package:flutter_tools/src/android/gradle.dart:507:5)
  &lt;asynchronous suspension&gt;
  #2      buildGradleProject (package:flutter_tools/src/android/gradle.dart:346:14)
  &lt;asynchronous suspension&gt;
  #3      buildApk (package:flutter_tools/src/android/apk.dart:34:9)
  &lt;asynchronous suspension&gt;
  #4      AndroidDevice.startApp (package:flutter_tools/src/android/android_device.dart:426:13)
  &lt;asynchronous suspension&gt;
  #5      FlutterDevice.runHot (package:flutter_tools/src/resident_runner.dart:371:54)
  &lt;asynchronous suspension&gt;
  #6      HotRunner.run (package:flutter_tools/src/run_hot.dart:251:39)
  &lt;asynchronous suspension&gt;
  #7      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:469:37)
  &lt;asynchronous suspension&gt;
  #8      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:478:18)
  &lt;asynchronous suspension&gt;
  #9      FlutterCommand.run.&lt;anonymous closure&gt; (package:flutter_tools/src/runner/flutter_command.dart:383:33)
  &lt;asynchronous suspension&gt;
  #10     AppContext.run.&lt;anonymous closure&gt; (package:flutter_tools/src/base/context.dart:153:29)
  &lt;asynchronous suspension&gt;
  #11     _rootRun (dart:async/zone.dart:1124:13)
  #12     _CustomZone.run (dart:async/zone.dart:1021:19)
  #13     _runZoned (dart:async/zone.dart:1516:10)
  #14     runZoned (dart:async/zone.dart:1463:12)
  #15     AppContext.run (package:flutter_tools/src/base/context.dart:152:18)
  &lt;asynchronous suspension&gt;
  #16     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:375:20)
  #17     CommandRunner.runCommand (package:args/command_runner.dart:197:27)
  &lt;asynchronous suspension&gt;
  #18     FlutterCommandRunner.runCommand.&lt;anonymous closure&gt;
  (package:flutter_tools/src/runner/flutter_command_runner.dart:396:21)
  &lt;asynchronous suspension&gt;
  #19     AppContext.run.&lt;anonymous closure&gt; (package:flutter_tools/src/base/context.dart:153:29)
  &lt;asynchronous suspension&gt;
  #20     _rootRun (dart:async/zone.dart:1124:13)
  #21     _CustomZone.run (dart:async/zone.dart:1021:19)
  #22     _runZoned (dart:async/zone.dart:1516:10)
  #23     runZoned (dart:async/zone.dart:1463:12)
  #24     AppContext.run (package:flutter_tools/src/base/context.dart:152:18)
  &lt;asynchronous suspension&gt;
  #25     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:356:19)
  &lt;asynchronous suspension&gt;
  #26     CommandRunner.run.&lt;anonymous closure&gt; (package:args/command_runner.dart:112:25)
  #27     new Future.sync (dart:async/future.dart:224:31)
  #28     CommandRunner.run (package:args/command_runner.dart:112:14)
  #29     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:242:18)
  #30     run.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:flutter_tools/runner.dart:62:22)
  &lt;asynchronous suspension&gt;
  #31     _rootRun (dart:async/zone.dart:1124:13)
  #32     _CustomZone.run (dart:async/zone.dart:1021:19)
  #33     _runZoned (dart:async/zone.dart:1516:10)
  #34     runZoned (dart:async/zone.dart:1500:12)
  #35     run.&lt;anonymous closure&gt; (package:flutter_tools/runner.dart:60:18)
  &lt;asynchronous suspension&gt;
  #36     AppContext.run.&lt;anonymous closure&gt; (package:flutter_tools/src/base/context.dart:153:29)
  &lt;asynchronous suspension&gt;
  #37     _rootRun (dart:async/zone.dart:1124:13)
  #38     _CustomZone.run (dart:async/zone.dart:1021:19)
  #39     _runZoned (dart:async/zone.dart:1516:10)
  #40     runZoned (dart:async/zone.dart:1463:12)
  #41     AppContext.run (package:flutter_tools/src/base/context.dart:152:18)
  &lt;asynchronous suspension&gt;
  #42     runInContext (package:flutter_tools/src/context_runner.dart:56:24)
  &lt;asynchronous suspension&gt;
  #43     run (package:flutter_tools/runner.dart:51:10)
  #44     main (package:flutter_tools/executable.dart:62:9)
  &lt;asynchronous suspension&gt;
  #45     main (file:///C:/Users/Dell/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
  #46     _startIsolate.&lt;anonymous closure&gt; (dart:isolate-patch/isolate_patch.dart:299:32)
  #47     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)
  </code></pre>
  
  <p>flutter doctor -v:</p>
  
  <pre><code>[√] Flutter (Channel stable, v1.7.8+hotfix.4, on Microsoft Windows [Version 10.0.15063], locale en-US)
      • Flutter version 1.7.8+hotfix.4 at C:\Users\Dell\flutter
      • Framework revision 20e59316b8 (6 weeks ago), 2019-07-18 20:04:33 -0700
      • Engine revision fee001c93f
      • Dart version 2.4.0
  
  
  [√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
      • Android SDK at C:\Users\Dell\AppData\Local\Android\sdk
      • Android NDK location not configured (optional; useful for native profiling support)
      • Platform android-28, build-tools 28.0.3
      • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
      • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
      • All Android licenses accepted.
  
  [√] Android Studio (version 3.3)
      • Android Studio at C:\Program Files\Android\Android Studio
      • Flutter plugin version 33.4.1
      • Dart plugin version 182.5215
      • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
  
  [√] VS Code (version 1.37.1)
      • VS Code at C:\Users\Dell\AppData\Local\Programs\Microsoft VS Code
      • Flutter extension version 3.3.0
  
  [√] Connected device (1 available)
      • RMX1801 • 8843cc23 • android-arm64 • Android 9 (API 28)
  
  • No issues found!
  </code></pre>