Android Gradle Issue - Flutter / Dart
解决 "Minimum supported Gradle version is 4.6. Current version is 3.3."
I have a problem with my Gradle Sync.
SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。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.
解决:
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

更多精彩