<h2 dir="auto">Steps to Reproduce</h2>
<p dir="auto">I have a project when I try to run a drive test, I get</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="  [drive-test]
    flutter drive -t test_driver/all.dart
    Using device Pixel XL.
    Starting application: test_driver/all.dart
    Initializing gradle...
    Resolving dependencies...
    Installing build/app/outputs/apk/app.apk...
    Running 'gradlew assembleDebug'...
  
    FAILURE: Build failed with an exception.
  
    * What went wrong:
    Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
    &gt; com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/common/internal/zzq.class
  
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    Gradle build failed: 1
  
  failed with exit code 1"><pre class="notranslate"><code class="notranslate">  [drive-test]
    flutter drive -t test_driver/all.dart
    Using device Pixel XL.
    Starting application: test_driver/all.dart
    Initializing gradle...
    Resolving dependencies...
    Installing build/app/outputs/apk/app.apk...
    Running 'gradlew assembleDebug'...
  
    FAILURE: Build failed with an exception.
  
    * What went wrong:
    Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
    &gt; com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/common/internal/zzq.class
  
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    Gradle build failed: 1
  
  failed with exit code 1
</code></pre></div>
<p dir="auto">I haven't found a <code class="notranslate">--stacktrace</code> option.</p>
<p dir="auto">Perhaps</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="   --[no-]trace-startup        Start tracing during startup."><pre class="notranslate"><code class="notranslate">   --[no-]trace-startup        Start tracing during startup.
</code></pre></div>
<p dir="auto">from <code class="notranslate">flutter drive -h</code> is meant?</p>
<h2 dir="auto">Logs</h2>
<p dir="auto">Run your application with <code class="notranslate">flutter run</code> and attach all the log output.</p>
<p dir="auto">Run <code class="notranslate">flutter analyze</code> and attach any output of that command also.</p>
<h2 dir="auto">Flutter Doctor</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" (issue376_save_image) $ flutter doctor
[✓] Flutter (on Mac OS X 10.13.1 17B48, locale en-AT, channel alpha)
    • Flutter at /Users/zoechi/flutter/flutter
    • Framework revision e8aa40eddd (5 weeks ago), 2017-10-17 15:42:40 -0700
    • Engine revision 7c4142808c
    • Tools Dart version 1.25.0-dev.11.0

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.1)
    • Android SDK at /usr/local/opt/android-sdk
    • Platform android-27, build-tools 27.0.1
    • ANDROID_HOME = /usr/local/opt/android-sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)

[✓] iOS toolchain - develop for iOS devices (Xcode 9.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 9.1, Build version 9B55
    • ios-deploy 1.9.2
    • CocoaPods version 1.3.1

[✓] Android Studio (version 3.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)

[✓] IntelliJ IDEA Ultimate Edition (version 2017.2.6)
    • Flutter plugin version 19.1
    • Dart plugin version 172.4343.25

[✓] Connected devices
    • Pixel XL • HT69V0203649 • android-arm • Android 8.0.0 (API 26)"><pre class="notranslate"><code class="notranslate"> (issue376_save_image) $ flutter doctor
[✓] Flutter (on Mac OS X 10.13.1 17B48, locale en-AT, channel alpha)
    • Flutter at /Users/zoechi/flutter/flutter
    • Framework revision e8aa40eddd (5 weeks ago), 2017-10-17 15:42:40 -0700
    • Engine revision 7c4142808c
    • Tools Dart version 1.25.0-dev.11.0

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.1)
    • Android SDK at /usr/local/opt/android-sdk
    • Platform android-27, build-tools 27.0.1
    • ANDROID_HOME = /usr/local/opt/android-sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)

[✓] iOS toolchain - develop for iOS devices (Xcode 9.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 9.1, Build version 9B55
    • ios-deploy 1.9.2
    • CocoaPods version 1.3.1

[✓] Android Studio (version 3.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)

[✓] IntelliJ IDEA Ultimate Edition (version 2017.2.6)
    • Flutter plugin version 19.1
    • Dart plugin version 172.4343.25

[✓] Connected devices
    • Pixel XL • HT69V0203649 • android-arm • Android 8.0.0 (API 26)
</code></pre></div>
<p dir="auto"><a href="https://github.com/afandria"><img src="https://avatars.githubusercontent.com/u/2432033?v=3" align="left" width="96" height="96" hspace="10" style="max-width: 100%;"></a> <strong>Issue by <a href="https://github.com/afandria">afandria</a></strong><br>
<em>Tuesday Aug 11, 2015 at 18:32 GMT</em><br>
<em>Originally opened as <a href="https://github.com/flutter/engine/issues/559">https://github.com/flutter/engine/issues/559</a></em></p>
<hr>
<p dir="auto"><a href="https://github.com/domokit/sky_engine/blob/master/sky/packages/sky/README.md#building-a-standalone-apk">Building a Standalone APK</a> instructions are not clear enough.</p>
<p dir="auto">It has been inconvenient to only be able to start my Sky app via <code class="notranslate">sky_tool</code>, so I wanted to build my own APK. Unfortunately, the link to the stocks/example does not have a <code class="notranslate">README.md</code> for how to build it. It appears that the <code class="notranslate">BUILD.gn</code>, <code class="notranslate">sky.yaml</code>, and <code class="notranslate">apk/AndroidManifest.xml</code> files are important to the process, but I am not sure what command(s) are needed to produce the APK.</p>