Repository navigation
Android Studio 3.6 bumps minimum Gradle version #51464
Copy link
Copy link
Closed
Labels
t: gradle"flutter build" and "flutter run" on Android"flutter build" and "flutter run" on AndroidtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Description
Android Studio 3.6 was released recently, and it seems it now requires a higher version of Gradle than the one Flutter is using.
Steps to Reproduce
- Run
flutter create bug. - Update the files as follows:
android/build.gradle->classpath 'com.android.tools.build:gradle:3.6.0' - Try to run or build the app for Android.
- The exception provided in the Logs section will appear.
Flutter projects are currently created using Gradle version 5.4.1, but to make it compatible with newer versions of Android Studio, it could be bumped to, at least, 5.6.4, or even 6.2.1 (latest).
Logs
Launching lib\main.dart on Pixel 3 XL in release mode...
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\Cristian\Desktop\airhopping\android\app\build.gradle' line: 24
* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.internal.version-check']
> Minimum supported Gradle version is 5.6.4. Current version is 5.5.1. If using the gradle wrapper, try editing the distributionUrl in C:\Users\Cristian\Desktop\airhopping\android\gradle\wrapper\gradle-wrapper.properties to gradle-5.6.4-all.zip
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
[✓] Flutter (Channel master, v1.15.4-pre.169, on Microsoft Windows [Versión 10.0.18363.657], locale es-ES)
• Flutter version 1.15.4-pre.169 at C:\src\flutter
• Framework revision 492fb6381e (7 hours ago), 2020-02-25 22:29:16 -0500
• Engine revision 888a62cf22
• Dart version 2.8.0 (build 2.8.0-dev.10.0 73f6d15665)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at C:\Users\Cristian\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-R, build-tools 29.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
• All Android licenses accepted.
[✓] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[✓] Android Studio (version 3.6)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 44.0.2-dev.4
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
[✓] Connected device (3 available)
• Pixel 3 XL • 89PY09NNV • android-arm64 • Android 10 (API 29)
• Chrome • chrome • web-javascript • Google Chrome 80.0.3987.122
• Web Server • web-server • web-javascript • Flutter Tools
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
t: gradle"flutter build" and "flutter run" on Android"flutter build" and "flutter run" on AndroidtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Activity
jmagman commentedon Feb 27, 2020
I was able to reproduce. The error went away after I following the instructions in the error and updated the distributionUrl.
jmagman commentedon Feb 27, 2020
I believe the version was last bumped in #40181.
jmagman commentedon Feb 27, 2020
Duplicate of #49438.
github-actions commentedon Aug 22, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.