Android:Gradle Issue - Flutter / Dart

  Issue:

  "Minimum supported Gradle version is 4.6. Current version is 3.3."

 

  I have a problem with my Gradle Sync. I use Android Studio to build a Flutter / Dart App.

Errortext =>

* Error running Gradle:
ProcessException: Process "F:\flutter_map\android\gradlew.bat" exited abnormally:

BUILD FAILED

Total time: 3.6 secs


FAILURE: Build failed with an exception.

* Where:
Build file 'F:\flutter_map\android\app\build.gradle' line: 14

* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.application']
   > Minimum supported Gradle version is 4.6. Current version is 3.3. If using the gradle wrapper, try editing the distributionUrl in F:\flutter_map\android\gradle\wrapper\gradle-wrapper.properties to gradle-4.6-all.zip

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  Command: F:\flutter_map\android\gradlew.bat app:properties

Finished with error: Please review your Gradle project setup in the android/ folder.

 

  Solution:

  try editing the distributionUrl in F:\flutter_map\android\gradle\wrapper\gradle-wrapper.properties to gradle-4.6-all.zip

 

  即打开项目目录下 \android\gradle\wrapper\gradle-wrapper.properties 文件,将

distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip

  修改为所需版本:

distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip

 

posted @ 2019-04-19 14:50  Sevenee  阅读(333)  评论(0)    收藏  举报