title: How to fix "Gradle build failed to produce an Android bundle package." in Flutter
body: <p>On running 
  <code>flutter build appbundle</code> I am getting the following error:
  Gradle build failed to produce an Android bundle package.</p>
  
  <p>When running in verbose mode this is what I additionally get:</p>
  
  <pre><code>#0      throwToolExit (package:flutter_tools/src/base/common.dart:24:3)
  #1      _buildGradleProjectV2 (package:flutter_tools/src/android/gradle.dart:585:7)
  &lt;asynchronous suspension&gt;
  #2      buildGradleProject (package:flutter_tools/src/android/gradle.dart:331:14)
  &lt;asynchronous suspension&gt;
  #3      buildAppBundle (package:flutter_tools/src/android/app_bundle.dart:43:10)
  &lt;asynchronous suspension&gt;
  #4      BuildAppBundleCommand.runCommand (package:flutter_tools/src/commands/build_appbundle.dart:43:11)
  &lt;asynchronous suspension&gt;
  #5      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:545:18)
  #6      _asyncThenWrapperHelper.&lt;anonymous closure&gt; (dart:async/runtime/libasync_patch.dart:77:64)
  #7      _rootRunUnary (dart:async/zone.dart:1132:38)
  #8      _CustomZone.runUnary (dart:async/zone.dart:1029:19)
  #9      _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
  #10     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
  #11     Future._propagateToListeners (dart:async/future_impl.dart:668:32)
  #12     Future._complete (dart:async/future_impl.dart:473:7)
  #13     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
  #14     _AsyncAwaitCompleter.complete.&lt;anonymous closure&gt; (dart:async/runtime/libasync_patch.dart:33:20)
  #15     _rootRun (dart:async/zone.dart:1124:13)
  #16     _CustomZone.run (dart:async/zone.dart:1021:19)
  #17     _CustomZone.bindCallback.&lt;anonymous closure&gt; (dart:async/zone.dart:947:23)
  #18     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
  #19     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
  #20     _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:115:13)
  #21     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:172:5)
  </code></pre>
  
  <p>I am on Flutter stable channel v1.2.1.</p>
  
  <p>I can build an apk without a problem though.
  I can also build an appbundle from another Flutter project.</p>
  
  <p>Based on the error messages above how would you start to find the issue?
  What might be the problem here?</p>