<h2 dir="auto">Steps to Reproduce</h2>
<p dir="auto">I'm using Powershell from within VSCode, and about 30% of the time <code class="notranslate">flutter run</code> will crash at the <code class="notranslate">Installing build\app/outputs/apk/app.apk...</code> step.<br>
If I immediately try <code class="notranslate">adb install -r build\app\outputs\apk\app.apk</code> the install succeeds with no issue, but obviously no debugging.<br>
I've tried doing <code class="notranslate">adb kill-server</code> before each run. I've tried <code class="notranslate">flutter run --no-build</code>. Nothing works 100% of the time, and the logs all look identical.</p>
<p dir="auto">I'm going to start regularly using -v so I can maybe give better logs next time it happens.<br>
(Don't mind the host error, I was offline this last time.)</p>
<h2 dir="auto">Shell log</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Launching lib/main.dart on LG H910 in debug mode...
Running 'gradle assembleDebug'...
Built build\app/outputs/apk/app-debug.apk (21.9MB).
Installing build\app/outputs/apk/app.apk...

Oops; flutter has exited unexpectedly: &quot;Exit code 1 from: C:\Android\sdk\platform-tools\adb -s LGH9107a67a5fd install -r build\app
/outputs/apk/app.apk&quot;.
Sending crash report to Google.
Failed to send crash report due to a network error: SocketException: Failed host lookup: 'clients2.google.com' (OS Error: No such
host is known.
, errno = 11001)
Crash report written to C:\Users\Kyle\Source\Flutter\Cybertronix\flutter_11.log;
please let us know at https://github.com/flutter/flutter/issues."><pre class="notranslate"><code class="notranslate">Launching lib/main.dart on LG H910 in debug mode...
Running 'gradle assembleDebug'...
Built build\app/outputs/apk/app-debug.apk (21.9MB).
Installing build\app/outputs/apk/app.apk...

Oops; flutter has exited unexpectedly: "Exit code 1 from: C:\Android\sdk\platform-tools\adb -s LGH9107a67a5fd install -r build\app
/outputs/apk/app.apk".
Sending crash report to Google.
Failed to send crash report due to a network error: SocketException: Failed host lookup: 'clients2.google.com' (OS Error: No such
host is known.
, errno = 11001)
Crash report written to C:\Users\Kyle\Source\Flutter\Cybertronix\flutter_11.log;
please let us know at https://github.com/flutter/flutter/issues.
</code></pre></div>
<h2 dir="auto">flutter_11.log</h2>
<p dir="auto">Flutter crash report; please file at <a href="https://github.com/flutter/flutter/issues">https://github.com/flutter/flutter/issues</a>.</p>
<h2 dir="auto">command</h2>
<p dir="auto">flutter run</p>
<h2 dir="auto">exception</h2>
<p dir="auto">String: Exit code 1 from: C:\Android\sdk\platform-tools\adb -s LGH9107a67a5fd install -r build\app/outputs/apk/app.apk</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#0      runCheckedAsync (package:flutter_tools/src/base/process.dart:214)
&lt;asynchronous suspension&gt;
#1      AndroidDevice.installApp (package:flutter_tools/src/android/android_device.dart:241)
&lt;asynchronous suspension&gt;
#2      AndroidDevice._installLatestApp (package:flutter_tools/src/android/android_device.dart:281)
&lt;asynchronous suspension&gt;
#3      AndroidDevice.startApp (package:flutter_tools/src/android/android_device.dart:335)
&lt;asynchronous suspension&gt;
#4      HotRunner.run (package:flutter_tools/src/run_hot.dart:203)
&lt;asynchronous suspension&gt;
#5      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:291)
&lt;asynchronous suspension&gt;
#6      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:151)
&lt;asynchronous suspension&gt;
#7      RunCommand.verifyThenRunCommand (package:flutter_tools/src/commands/run.dart:205)
&lt;asynchronous suspension&gt;
#8      FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:121)
#9      CommandRunner.runCommand (package:args/command_runner.dart:194)
&lt;asynchronous suspension&gt;
#10     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:262)
&lt;asynchronous suspension&gt;
#11     CommandRunner.run.&lt;anonymous closure&gt; (package:args/command_runner.dart:109)
#12     Future.Future.sync (dart:async/future.dart:208)
#13     CommandRunner.run (package:args/command_runner.dart:109)
#14     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:157)
#15     run.&lt;anonymous closure&gt; (package:flutter_tools/executable.dart:140)
&lt;asynchronous suspension&gt;
#16     AppContext._run (package:flutter_tools/src/base/context.dart:76)
&lt;asynchronous suspension&gt;
#17     AppContext.runInZone.&lt;anonymous closure&gt; (package:flutter_tools/src/base/context.dart:66)
#18     _rootRun (dart:async/zone.dart:1120)
#19     _CustomZone.run (dart:async/zone.dart:1001)
#20     runZoned (dart:async/zone.dart:1465)
#21     AppContext.runInZone (package:flutter_tools/src/base/context.dart:65)
#22     run (package:flutter_tools/executable.dart:113)
&lt;asynchronous suspension&gt;
#23     main (package:flutter_tools/executable.dart:66)
&lt;asynchronous suspension&gt;
#24     main (file:///C:/flutter/packages/flutter_tools/bin/flutter_tools.dart:8)
#25     _startIsolate.&lt;anonymous closure&gt; (dart:isolate-patch/isolate_patch.dart:263)
#26     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)"><pre class="notranslate"><code class="notranslate">#0      runCheckedAsync (package:flutter_tools/src/base/process.dart:214)
&lt;asynchronous suspension&gt;
#1      AndroidDevice.installApp (package:flutter_tools/src/android/android_device.dart:241)
&lt;asynchronous suspension&gt;
#2      AndroidDevice._installLatestApp (package:flutter_tools/src/android/android_device.dart:281)
&lt;asynchronous suspension&gt;
#3      AndroidDevice.startApp (package:flutter_tools/src/android/android_device.dart:335)
&lt;asynchronous suspension&gt;
#4      HotRunner.run (package:flutter_tools/src/run_hot.dart:203)
&lt;asynchronous suspension&gt;
#5      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:291)
&lt;asynchronous suspension&gt;
#6      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:151)
&lt;asynchronous suspension&gt;
#7      RunCommand.verifyThenRunCommand (package:flutter_tools/src/commands/run.dart:205)
&lt;asynchronous suspension&gt;
#8      FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:121)
#9      CommandRunner.runCommand (package:args/command_runner.dart:194)
&lt;asynchronous suspension&gt;
#10     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:262)
&lt;asynchronous suspension&gt;
#11     CommandRunner.run.&lt;anonymous closure&gt; (package:args/command_runner.dart:109)
#12     Future.Future.sync (dart:async/future.dart:208)
#13     CommandRunner.run (package:args/command_runner.dart:109)
#14     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:157)
#15     run.&lt;anonymous closure&gt; (package:flutter_tools/executable.dart:140)
&lt;asynchronous suspension&gt;
#16     AppContext._run (package:flutter_tools/src/base/context.dart:76)
&lt;asynchronous suspension&gt;
#17     AppContext.runInZone.&lt;anonymous closure&gt; (package:flutter_tools/src/base/context.dart:66)
#18     _rootRun (dart:async/zone.dart:1120)
#19     _CustomZone.run (dart:async/zone.dart:1001)
#20     runZoned (dart:async/zone.dart:1465)
#21     AppContext.runInZone (package:flutter_tools/src/base/context.dart:65)
#22     run (package:flutter_tools/executable.dart:113)
&lt;asynchronous suspension&gt;
#23     main (package:flutter_tools/executable.dart:66)
&lt;asynchronous suspension&gt;
#24     main (file:///C:/flutter/packages/flutter_tools/bin/flutter_tools.dart:8)
#25     _startIsolate.&lt;anonymous closure&gt; (dart:isolate-patch/isolate_patch.dart:263)
#26     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)
</code></pre></div>
<h2 dir="auto">flutter doctor</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[✓] Flutter (on Microsoft Windows [Version 6.3.9600], channel master)
    • Flutter at C:\flutter
    • Framework revision e2cd78358f (19 hours ago), 2017-04-26 13:14:31 -0700
    • Engine revision a5b64899c9
    • Tools Dart version 1.23.0-dev.11.11

[✓] Host Executable Compatibility
    • Downloaded executables execute on host

[✓] Android toolchain - develop for Android devices (Android SDK 25.0.2)
    • Android SDK at C:\Android\sdk
    • Platform android-25, build-tools 25.0.2
    • ANDROID_HOME = C:\Android\sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version: OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

[✓] Android Studio (version 2.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Gradle version 3.2
    • Java version: OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

[✓] IntelliJ IDEA Community Edition (version 2016.3)
    • Dart plugin version 163.13137
    • Flutter plugin version 0.1.11.2

[✓] Connected devices
    • LG H910 • LGH9107a67a5fd • android-arm • Android 7.0 (API 24)
"><pre class="notranslate"><code class="notranslate">[✓] Flutter (on Microsoft Windows [Version 6.3.9600], channel master)
    • Flutter at C:\flutter
    • Framework revision e2cd78358f (19 hours ago), 2017-04-26 13:14:31 -0700
    • Engine revision a5b64899c9
    • Tools Dart version 1.23.0-dev.11.11

[✓] Host Executable Compatibility
    • Downloaded executables execute on host

[✓] Android toolchain - develop for Android devices (Android SDK 25.0.2)
    • Android SDK at C:\Android\sdk
    • Platform android-25, build-tools 25.0.2
    • ANDROID_HOME = C:\Android\sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version: OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

[✓] Android Studio (version 2.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Gradle version 3.2
    • Java version: OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

[✓] IntelliJ IDEA Community Edition (version 2016.3)
    • Dart plugin version 163.13137
    • Flutter plugin version 0.1.11.2

[✓] Connected devices
    • LG H910 • LGH9107a67a5fd • android-arm • Android 7.0 (API 24)

</code></pre></div>
<h2 dir="auto">Steps to Reproduce</h2>
<p dir="auto">Attempt to run from Android Studio on Windows 10.  <em><strong>Sometimes</strong></em> the following dialog appears:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/3227777/23655274/5cde7de0-0302-11e7-952f-4a6fc21b0f85.png"><img src="https://cloud.githubusercontent.com/assets/3227777/23655274/5cde7de0-0302-11e7-952f-4a6fc21b0f85.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">Workaround:  Cancelling the dialog and trying again eventually resolves the problem.</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/goderbauer/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/goderbauer">@goderbauer</a> requested that I file this issue.</p>
<h2 dir="auto">Logs</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ adb install-multiple -r ...\android\app\build\intermediates\split-apk\debug\slices\slice_4.apk ...\android\app\build\intermediates\split-apk\debug\slices\slice_3.apk ...\android\app\build\intermediates\split-apk\debug\slices\slice_9.apk ...\android\app\build\intermediates\split-apk\debug\slices\slice_5.apk ...\android\app\build\intermediates\split-apk\debug\slices\slice_8.apk ...\android\app\build\intermediates\split-apk\debug\slices\slice_7.apk ...\android\app\build\intermediates\split-apk\debug\slices\slice_6.apk ...\android\app\build\intermediates\split-apk\debug\dep\dependencies.apk ...\android\app\build\intermediates\split-apk\debug\slices\slice_1.apk ...\android\app\build\intermediates\split-apk\debug\slices\slice_2.apk ...\android\app\build\intermediates\split-apk\debug\slices\slice_0.apk ...\android\app\build\outputs\apk\app-debug.apk 
Error while Installing APKs"><pre class="notranslate"><code class="notranslate">$ adb install-multiple -r ...\android\app\build\intermediates\split-apk\debug\slices\slice_4.apk ...\android\app\build\intermediates\split-apk\debug\slices\slice_3.apk ...\android\app\build\intermediates\split-apk\debug\slices\slice_9.apk ...\android\app\build\intermediates\split-apk\debug\slices\slice_5.apk ...\android\app\build\intermediates\split-apk\debug\slices\slice_8.apk ...\android\app\build\intermediates\split-apk\debug\slices\slice_7.apk ...\android\app\build\intermediates\split-apk\debug\slices\slice_6.apk ...\android\app\build\intermediates\split-apk\debug\dep\dependencies.apk ...\android\app\build\intermediates\split-apk\debug\slices\slice_1.apk ...\android\app\build\intermediates\split-apk\debug\slices\slice_2.apk ...\android\app\build\intermediates\split-apk\debug\slices\slice_0.apk ...\android\app\build\outputs\apk\app-debug.apk 
Error while Installing APKs
</code></pre></div>
<h2 dir="auto">Flutter Doctor</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[√] Flutter (on Windows, channel master)
    • Flutter at C:\dev\flutter
    • Framework revision ca0201d8ae (3 days ago),
    • Engine revision 342a31136e
    • Tools Dart version 1.23.0-dev.2.0

[√] Android toolchain - develop for Android devices (Android SDK 25.0.2)
    • Android SDK at C:\Users\Rob\AppData\Local\Android\sdk
    • Platform android-25, build-tools 25.0.2
    • Java(TM) SE Runtime Environment (build 1.8.0_121-b13)

[√] Android Studio (version 2.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Gradle version 3.2

[√] IntelliJ IDEA Community Edition (version 2016.3)
    • Dart plugin version 163.13137
    • Flutter plugin version 0.1.11.1

[√] Connected devices
    • 2PS64 • HT69N0100346 • android-arm • Android 7.0 (API 24)"><pre class="notranslate"><code class="notranslate">[√] Flutter (on Windows, channel master)
    • Flutter at C:\dev\flutter
    • Framework revision ca0201d8ae (3 days ago),
    • Engine revision 342a31136e
    • Tools Dart version 1.23.0-dev.2.0

[√] Android toolchain - develop for Android devices (Android SDK 25.0.2)
    • Android SDK at C:\Users\Rob\AppData\Local\Android\sdk
    • Platform android-25, build-tools 25.0.2
    • Java(TM) SE Runtime Environment (build 1.8.0_121-b13)

[√] Android Studio (version 2.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Gradle version 3.2

[√] IntelliJ IDEA Community Edition (version 2016.3)
    • Dart plugin version 163.13137
    • Flutter plugin version 0.1.11.1

[√] Connected devices
    • 2PS64 • HT69N0100346 • android-arm • Android 7.0 (API 24)
</code></pre></div>