Repository: flutter
Issue: "flutter run" crashes on Android
Labels: c: crash,platform-android,tool,t: gradle,a: build,P2,team-android,triaged-android

Steps to Reproduce

<!-- Please tell us exactly how to reproduce the problem you are running into. -->

1. flutter run

## Logs

```
Flutter crash report; please file at https://github.com/flutter/flutter/issues.

## command

flutter run

## exception

ProcessException: ProcessException: Process "C:\Users\Ranjan Binwani\Desktop\hello_rectangle\hello_rectangle\android\gradlew.bat" exited abnormally:

------------------------------------------------------------
Gradle 4.10.2
------------------------------------------------------------

Build time:   2018-09-19 18:10:15 UTC
Revision:     b4d8d5d170bb4ba516e88d7fe5647e2323d791dd

Kotlin DSL:   1.0-rc-6
Kotlin:       1.2.61
Groovy:       2.4.15
Ant:          Apache Ant(TM) version 1.9.11 compiled on March 23 2018
JVM:          1.8.0_202-release (JetBrains s.r.o 25.202-b03)
OS:           Windows 10 10.0 amd64


The system cannot find the path specified.
  Command: C:\Users\Ranjan Binwani\Desktop\hello_rectangle\hello_rectangle\android\gradlew.bat -v
```
```
#0      runCheckedAsync (package:flutter_tools/src/base/process.dart:259:7)
<asynchronous suspension>
#1      _initializeGradle (package:flutter_tools/src/android/gradle.dart:300:9)
<asynchronous suspension>
#2      _ensureGradle (package:flutter_tools/src/android/gradle.dart:281:37)
<asynchronous suspension>
#3      _readGradleProject (package:flutter_tools/src/android/gradle.dart:192:31)
<asynchronous suspension>
#4      _gradleAppProject (package:flutter_tools/src/android/gradle.dart:112:37)
<asynchronous suspension>
#5      getGradleAppOut (package:flutter_tools/src/android/gradle.dart:106:29)
<asynchronous suspension>
#6      AndroidApk.fromAndroidProject (package:flutter_tools/src/application_package.dart:164:23)
<asynchronous suspension>
#7      ApplicationPackageFactory.getPackageForPlatform (package:flutter_tools/src/application_package.dart:46:32)
<asynchronous suspension>
#8      FlutterDevice.runHot (package:flutter_tools/src/resident_runner.dart:359:56)
<asynchronous suspension>
#9      HotRunner.run (package:flutter_tools/src/run_hot.dart:254:39)
<asynchronous suspension>
#10     RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:472:37)
<asynchronous suspension>
#11     FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:490:18)
#12     _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
#13     _rootRunUnary (dart:async/zone.dart:1132:38)
#14     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#15     _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#16     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#17     Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#18     Future._completeWithValue (dart:async/future_impl.dart:522:5)
#19     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:30:15)
#20     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:288:13)
#21     RunCommand.usageValues (package:flutter_tools/src/commands/run.dart)
#22     _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
#23     _rootRunUnary (dart:async/zone.dart:1132:38)
#24     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#25     _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#26     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#27     Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#28     Future._completeWithValue (dart:async/future_impl.dart:522:5)
#29     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:30:15)
#30     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:288:13)
#31     AndroidDevice.isLocalEmulator (package:flutter_tools/src/android/android_device.dart)
#32     _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
#33     _rootRunUnary (dart:async/zone.dart:1132:38)
#34     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#35     _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#36     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#37     Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#38     Future._completeWithValue (dart:async/future_impl.dart:522:5)
#39     Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:552:7)
#40     _rootRun (dart:async/zone.dart:1124:13)
#41     _CustomZone.run (dart:async/zone.dart:1021:19)
#42     _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#43     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#44     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#45     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#46     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:116:13)
#47     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:173:5)
```

## flutter doctor

```
[32m[✓][39m Flutter (Channel stable, v1.9.1+hotfix.2, on Windows, locale en-US)
    [32m•[39m Flutter version 1.9.1+hotfix.2 at C:\src\flutter
    [32m•[39m Framework revision 2d2a1ffec9 (4 weeks ago), 2019-09-06 18:39:49 -0700
    [32m•[39m Engine revision b863200c37
    [32m•[39m Dart version 2.5.0

[32m[✓][39m Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    [32m•[39m Android SDK at C:\Users\Ranjan Binwani\AppData\Local\Android\Sdk
    [32m•[39m Android NDK location not configured (optional; useful for native profiling support)
    [32m•[39m Platform android-28, build-tools 28.0.3
    [32m•[39m ANDROID_HOME = C:\Users\Ranjan Binwani\AppData\Local\Android\Sdk
    [32m•[39m Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    [32m•[39m Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
    [32m•[39m All Android licenses accepted.

[32m[✓][39m Android Studio (version 3.5)
    [32m•[39m Android Studio at C:\Program Files\Android\Android Studio
    [32m•[39m Flutter plugin version 39.0.3
    [32m•[39m Dart plugin version 191.8423
    [32m•[39m Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[32m[✓][39m VS Code (version 1.38.1)
    [32m•[39m VS Code at C:\Users\Ranjan Binwani\AppData\Local\Programs\Microsoft VS Code
    [32m•[39m Flutter extension version 3.4.1

[32m[✓][39m Connected device (1 available)
    [32m•[39m SM A505F • R58M45A393B • android-arm64 • Android 9 (API 28)

[32m•[39m No issues found!
```
```
[√] Flutter (Channel stable, v1.9.1+hotfix.2, on Windows, locale en-US)
    • Flutter version 1.9.1+hotfix.2 at C:\src\flutter
    • Framework revision 2d2a1ffec9 (4 weeks ago), 2019-09-06 18:39:49 -0700
    • Engine revision b863200c37
    • Dart version 2.5.0


[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at C:\Users\Ranjan Binwani\AppData\Local\Android\Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = C:\Users\Ranjan Binwani\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
    • All Android licenses accepted.

[√] Android Studio (version 3.5)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 39.0.3
    • Dart plugin version 191.8423
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[√] VS Code (version 1.38.1)
    • VS Code at C:\Users\Ranjan Binwani\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.4.1

[√] Connected device (1 available)
    • SM A505F • R58M45A393B • android-arm64 • Android 9 (API 28)

• No issues found!

```