title: how to compile first flutter app with lastest gardle version
body: <p><strong>I create e new flutter application with android studio (on windows 10) and i try to run the created project but gradlew.bat exited abnormally.</strong></p>
  
  <p>After the update of flutter i can't compile any project. 
  I try to compile with android studio and line command with flutter run.</p>
  
  <p>I try to change <code>distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip</code></p>
  
  <p>to </p>
  
  <pre><code>distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
  </code></pre>
  
  <p>in gardle-wrapper.properties but nothing change.</p>
  
  <p><strong>Below the log error on android studio</strong></p>
  
  <pre><code>Finished with error: ProcessException: Process "D:\FlutterApps\flutter_app2\android\gradlew.bat" exited abnormally:
  Exception in thread "main" java.io.FileNotFoundException: C:\Program Files\Android\Android Studio\gradle\gradle-5.1.1\bin\wrapper\dists\gradle-4.10.2-all\9fahxiiecdb76a5g3aw9oi8rv\gradle-4.10.2-all.zip.lck (Impossibile trovare il percorso specificato)
      at java.io.RandomAccessFile.open0(Native Method)
      at java.io.RandomAccessFile.open(RandomAccessFile.java:316)
      at java.io.RandomAccessFile.&lt;init&gt;(RandomAccessFile.java:243)
      at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:49)
      at org.gradle.wrapper.Install.createDist(Install.java:48)
      at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128)
      at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
    Command: D:\FlutterApps\flutter_app2\android\gradlew.bat -v
  
  
  **and the log error with flutter line command**
  
  
  
  
  
  ProcessException: ProcessException: Process "D:\FlutterApps\flutter_app2\android\gradlew.bat" exited abnormally:
  Exception in thread "main" java.io.FileNotFoundException: C:\Program Files\Android\Android Studio\gradle\gradle-5.1.1\bin\wrapper\dists\gradle-4.10.2-all\9fahxiiecdb76a5g3aw9oi8rv\gradle-4.10.2-all.zip.lck (Impossibile trovare il percorso specificato)
      at java.io.RandomAccessFile.open0(Native Method)
      at java.io.RandomAccessFile.open(RandomAccessFile.java:316)
      at java.io.RandomAccessFile.&lt;init&gt;(RandomAccessFile.java:243)
      at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:49)
      at org.gradle.wrapper.Install.createDist(Install.java:48)
      at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128)
      at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
    Command: D:\FlutterApps\flutter_app2\android\gradlew.bat -v
  
  ```
  #0      runCheckedAsync (package:flutter_tools/src/base/process.dart:259:7)
  &lt;asynchronous suspension&gt;
  #1      _initializeGradle (package:flutter_tools/src/android/gradle.dart:225:9)
  &lt;asynchronous suspension&gt;
  #2      _ensureGradle (package:flutter_tools/src/android/gradle.dart:206:37)
  &lt;asynchronous suspension&gt;
  #3      _readGradleProject (package:flutter_tools/src/android/gradle.dart:134:31)
  &lt;asynchronous suspension&gt;
  #4      _gradleProject (package:flutter_tools/src/android/gradle.dart:111:34)
  &lt;asynchronous suspension&gt;
  #5      getGradleAppOut (package:flutter_tools/src/android/gradle.dart:105:29)
  &lt;asynchronous suspension&gt;
  #6      AndroidApk.fromAndroidProject (package:flutter_tools/src/application_package.dart:160:23)
  &lt;asynchronous suspension&gt;
  #7      ApplicationPackageFactory.getPackageForPlatform (package:flutter_tools/src/application_package.dart:47:32)
  &lt;asynchronous suspension&gt;
  #8      FlutterDevice.runHot (package:flutter_tools/src/resident_runner.dart:352:56)
  &lt;asynchronous suspension&gt;
  #9      HotRunner.run (package:flutter_tools/src/run_hot.dart:251:39)
  &lt;asynchronous suspension&gt;
  #10     RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:469:37)
  &lt;asynchronous suspension&gt;
  #11     FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:478:18)
  &lt;asynchronous suspension&gt;
  #12     FlutterCommand.run.&lt;anonymous closure&gt; (package:flutter_tools/src/runner/flutter_command.dart:383:33)
  &lt;asynchronous suspension&gt;
  #13     AppContext.run.&lt;anonymous closure&gt; (package:flutter_tools/src/base/context.dart:153:29)
  &lt;asynchronous suspension&gt;
  #14     _rootRun (dart:async/zone.dart:1124:13)
  #15     _CustomZone.run (dart:async/zone.dart:1021:19)
  #16     _runZoned (dart:async/zone.dart:1516:10)
  #17     runZoned (dart:async/zone.dart:1463:12)
  #18     AppContext.run (package:flutter_tools/src/base/context.dart:152:18)
  &lt;asynchronous suspension&gt;
  #19     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:375:20)
  #20     CommandRunner.runCommand (package:args/command_runner.dart:197:27)
  &lt;asynchronous suspension&gt;
  #21     FlutterCommandRunner.runCommand.&lt;anonymous closure&gt; (package:flutter_tools/src/runner/flutter_command_runner.dart:396:21)
  &lt;asynchronous suspension&gt;
  #22     AppContext.run.&lt;anonymous closure&gt; (package:flutter_tools/src/base/context.dart:153:29)
  &lt;asynchronous suspension&gt;
  #23     _rootRun (dart:async/zone.dart:1124:13)
  #24     _CustomZone.run (dart:async/zone.dart:1021:19)
  #25     _runZoned (dart:async/zone.dart:1516:10)
  #26     runZoned (dart:async/zone.dart:1463:12)
  #27     AppContext.run (package:flutter_tools/src/base/context.dart:152:18)
  &lt;asynchronous suspension&gt;
  #28     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:356:19)
  &lt;asynchronous suspension&gt;
  #29     CommandRunner.run.&lt;anonymous closure&gt; (package:args/command_runner.dart:112:25)
  #30     new Future.sync (dart:async/future.dart:224:31)
  #31     CommandRunner.run (package:args/command_runner.dart:112:14)
  #32     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:242:18)
  #33     run.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:flutter_tools/runner.dart:62:22)
  &lt;asynchronous suspension&gt;
  #34     _rootRun (dart:async/zone.dart:1124:13)
  #35     _CustomZone.run (dart:async/zone.dart:1021:19)
  #36     _runZoned (dart:async/zone.dart:1516:10)
  #37     runZoned (dart:async/zone.dart:1500:12)
  #38     run.&lt;anonymous closure&gt; (package:flutter_tools/runner.dart:60:18)
  &lt;asynchronous suspension&gt;
  #39     AppContext.run.&lt;anonymous closure&gt; (package:flutter_tools/src/base/context.dart:153:29)
  &lt;asynchronous suspension&gt;
  #40     _rootRun (dart:async/zone.dart:1124:13)
  #41     _CustomZone.run (dart:async/zone.dart:1021:19)
  #42     _runZoned (dart:async/zone.dart:1516:10)
  #43     runZoned (dart:async/zone.dart:1463:12)
  #44     AppContext.run (package:flutter_tools/src/base/context.dart:152:18)
  &lt;asynchronous suspension&gt;
  #45     runInContext (package:flutter_tools/src/context_runner.dart:56:24)
  &lt;asynchronous suspension&gt;
  #46     run (package:flutter_tools/runner.dart:51:10)
  #47     main (package:flutter_tools/executable.dart:62:9)
  &lt;asynchronous suspension&gt;
  #48     main (file:///C:/Android/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
  #49     _startIsolate.&lt;anonymous closure&gt; (dart:isolate-patch/isolate_patch.dart:299:32)
  #50     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)
  ```
  
  ## flutter doctor
  
  ```
  [32m[✓][39m Flutter (Channel beta, v1.7.8+hotfix.3, on Microsoft Windows [Versione 10.0.17134.885], locale it-IT)
      [32m•[39m Flutter version 1.7.8+hotfix.3 at C:\Android\flutter
      [32m•[39m Framework revision b712a172f9 (3 days ago), 2019-07-09 13:14:38 -0700
      [32m•[39m Engine revision 54ad777fd2
      [32m•[39m Dart version 2.4.0
  
  [32m[✓][39m Android toolchain - develop for Android devices (Android SDK version 28.0.3)
      [32m•[39m Android SDK at C:\Users\neo\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 Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
      [32m•[39m Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
      [32m•[39m All Android licenses accepted.
  
  [32m[✓][39m Android Studio (version 3.4)
      [32m•[39m Android Studio at C:\Program Files\Android\Android Studio
      [32m•[39m Flutter plugin version 37.0.1
      [32m•[39m Dart plugin version 183.6270
      [32m•[39m Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
  
  [32m[✓][39m Connected device (1 available)
      [32m•[39m Android SDK built for x86 • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)
  
  [32m•[39m No issues found!
  ```
  </code></pre>