Repository: flutter
Issue: Gradle failure on Windows with & in project path
Labels: c: crash,tool,platform-windows,t: gradle,P2,team-tool,triaged-tool

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill our the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Steps to Reproduce

<!-- Please tell us exactly how to reproduce the problem you are running into. -->

When i Run app i get this error ProcessException: ProcessException: Process "E:\Flutter&Dart\projects\start_app\android\gradlew.bat" exited abnormally:
'E:\Flutter' is not recognized as an internal or external command,
operable program or batch file.
I tried to update my gradle or download it offline and still i have same problem.

## Logs

<!--
      Include the full logs of the commands you are running between the lines
      with the backticks below. If you are running any "flutter" commands,
      please include the output of running them with "--verbose"; for example,
      the output of running "flutter --verbose create foo".
-->
Flutter crash report; please file at https://github.com/flutter/flutter/issues.

## command

flutter run

## exception

```
ProcessException: ProcessException: Process "E:\Flutter&Dart\projects\start_app\android\gradlew.bat" exited abnormally:
'E:\Flutter' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the path specified.
  Command: E:\Flutter&Dart\projects\start_app\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 Microsoft Windows [Version 10.0.17763.737], locale en-US)
    [32m•[39m Flutter version 1.9.1+hotfix.2 at C:\src\flutter
    [32m•[39m Framework revision 2d2a1ffec9 (3 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 29.0.2)
    [32m•[39m Android SDK at G:\Android\sdk
    [32m•[39m Android NDK location not configured (optional; useful for native profiling support)
    [32m•[39m Platform android-29, build-tools 29.0.2
    [32m•[39m ANDROID_HOME = G:\Android\sdk
    [32m•[39m Java binary at: G:\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 G:\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\Magician\AppData\Local\Programs\Microsoft VS Code
    [32m•[39m Flutter extension version 3.4.1

[32m[✓][39m Connected device (1 available)
    [32m•[39m CPH1901 • 4b2650d4 • android-arm64 • Android 8.1.0 (API 27)

[32m•[39m No issues found!
```


<!-- If possible, paste the output of running `flutter doctor -v` here. -->
E:\Flutter&Dart\projects\start_app>flutter doctor -v
[√] Flutter (Channel stable, v1.9.1+hotfix.2, on Microsoft Windows [Version 10.0.17763.737], locale en-US)
    • Flutter version 1.9.1+hotfix.2 at C:\src\flutter
    • Framework revision 2d2a1ffec9 (3 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 29.0.2)
    • Android SDK at G:\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • ANDROID_HOME = G:\Android\sdk
    • Java binary at: G:\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 G:\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\Magician\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.4.1

[√] Connected device (1 available)
    • CPH1901 • 4b2650d4 • android-arm64 • Android 8.1.0 (API 27)

• No issues found!