Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade the Gradle version in the project template #49438

Closed
blasten opened this issue Jan 24, 2020 · 5 comments · Fixed by #70808 or #71446
Closed

Upgrade the Gradle version in the project template #49438

blasten opened this issue Jan 24, 2020 · 5 comments · Fixed by #70808 or #71446
Assignees
Labels
c: new feature Nothing broken; request for a new capability P1 High-priority issues at the top of the work list t: gradle "flutter build" and "flutter run" on Android tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@blasten
Copy link

blasten commented Jan 24, 2020

Gradle 6.0 came out recently: https://docs.gradle.org/6.0/release-notes.html

The Flutter template currently uses 5.6. However, 6.0 might become the default version for new Android apps generated by Android Studio.

For context, this is already the case: #46260 (comment) if a Flutter app is edited on Android Studio.

@blasten blasten added c: new feature Nothing broken; request for a new capability tool Affects the "flutter" command-line tool. See also t: labels. t: gradle "flutter build" and "flutter run" on Android labels Jan 24, 2020
@jmagman jmagman added this to Awaiting triage in Tools - Gradle review via automation Jan 27, 2020
@jmagman
Copy link
Member

jmagman commented Feb 27, 2020

From #51464:

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).

@blasten blasten self-assigned this Feb 27, 2020
@blasten blasten added this to the March 2020 milestone Feb 27, 2020
@jonahwilliams jonahwilliams moved this from Awaiting triage to Engineer reviewed in Tools - Gradle review Feb 28, 2020
@Hixie Hixie modified the milestones: March 2020, Overdue Apr 7, 2020
@blasten blasten modified the milestones: Overdue, July 2020 Apr 7, 2020
@kf6gpe kf6gpe added the P1 High-priority issues at the top of the work list label May 29, 2020
@blasten blasten removed this from the 1.21 - July 2020 milestone Jul 8, 2020
@blasten blasten moved this from Engineer reviewed to Awaiting triage in Tools - Gradle review Jul 8, 2020
@renanyoy
Copy link

renanyoy commented Nov 5, 2020

trying to build our app from vscode
it was working before
seems related to flutter using an obsolete gradle version

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
  /Users/renanyoy/git/a2ds/apps/Flutter/leads2keys/build/app/intermediates/merged_manifests/debug/AndroidManifest.xml:22: AAPT: error: unexpected element <queries> found in <manifest>.
[✓] Flutter (Channel stable, 1.22.3, on Mac OS X 10.15.7 19H2, locale en-FR)
    • Flutter version 1.22.3 at /Users/renanyoy/code/sdk/flutter
    • Framework revision 8874f21e79 (7 days ago), 2020-10-29 14:14:35 -0700
    • Engine revision a1440ca392
    • Dart version 2.10.3

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/renanyoy/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.1, Build version 12A7403
    • CocoaPods version 1.10.0.rc.1

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 50.0.1
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.50.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.16.0

 
[✓] Connected device (2 available)            
    • Pixel 3a (mobile)    • 9BCAY1J68Q                • android-arm64 • Android 11 (API 30)
    • Renaniphone (mobile) • 00008020-000640992209002E • ios           • iOS 14.1

@renanyoy
Copy link

fixed with gradle update to 6.7.0 and reverting back build.graddle from 4.0.1 to 3.6.2

dependencies {
        classpath 'com.android.tools.build:gradle:3.6.2'

Tools - Gradle review automation moved this from Awaiting triage to Engineer reviewed Nov 20, 2020
@jmagman
Copy link
Member

jmagman commented Nov 24, 2020

#70808 was reverted.

@jmagman jmagman reopened this Nov 24, 2020
Tools - Gradle review automation moved this from Engineer reviewed to Awaiting triage Nov 24, 2020
Tools - Gradle review automation moved this from Awaiting triage to Engineer reviewed Dec 2, 2020
@github-actions
Copy link

github-actions bot commented Aug 9, 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 -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: new feature Nothing broken; request for a new capability P1 High-priority issues at the top of the work list t: gradle "flutter build" and "flutter run" on Android tool Affects the "flutter" command-line tool. See also t: labels.
Projects
Tools - Gradle review
  
Engineer reviewed
5 participants