Skip to content

Android Studio 3.6 bumps minimum Gradle version #51464

Closed

Description

@Zazo032

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

  1. Run flutter create bug.
  2. Update the files as follows: android/build.gradle -> classpath 'com.android.tools.build:gradle:3.6.0'
  3. Try to run or build the app for Android.
  4. 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

Activity

  1. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    on Feb 26, 2020
  2. added
    t: gradle"flutter build" and "flutter run" on Android
    on Feb 27, 2020
  3. jmagman commented on Feb 27, 2020

    @jmagman
    Member

    I was able to reproduce. The error went away after I following the instructions in the error and updated the distributionUrl.

  4. jmagman commented on Feb 27, 2020

    @jmagman
    Member

    I believe the version was last bumped in #40181.

  5. jmagman commented on Feb 27, 2020

    @jmagman
    Member

    Duplicate of #49438.

  6. github-actions commented on Aug 22, 2021

    @github-actions

    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 -v and a minimal reproduction of the issue.

  7. locked as resolved and limited conversation to collaborators on Aug 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    t: gradle"flutter build" and "flutter run" on AndroidtoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions