Skip to content

Flutter downloads (and uses?) old Android SDK build tools #41462

Closed

Description

@Zazo032

If only latest Android SDK build tools are installed (currently 29.0.2), Flutter will force the download of an old version (28.0.3) to run/build an app (both debug and release modes).

Screenshot

Steps to Reproduce

  1. Remove all build tools versions
  2. Install only latest build tools version (currently, 29.0.2)
  3. flutter run

Flutter Doctor

[√] Flutter (Channel master, v1.10.7-pre.53, on Microsoft Windows [Versión 10.0.18362.356], locale es-ES)
    • Flutter version 1.10.7-pre.53 at C:\src\flutter
    • Framework revision f11c34109c (77 minutes ago), 2019-09-27 10:46:45 +0200
    • Engine revision 18bc0b2596
    • Dart version 2.6.0 (build 2.6.0-dev.3.0 403c4af720)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at C:\Users\Cristian\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
    • All Android licenses accepted.

[√] Android Studio (version 3.5)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 39.0.3
    • Dart plugin version 191.8423
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[√] Connected device (1 available)
    • Pixel 3 XL • 89PY09NNV • android-arm64 • Android 10 (API 29)

• No issues found!

Activity

  1. escamoteur commented on Sep 27, 2019

    @escamoteur
    Contributor

    Is this a problem for you?
    @jonahwilliams is there a reason for this?

  2. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Sep 27, 2019
  3. Zazo032 commented on Sep 27, 2019

    @Zazo032
    ContributorAuthor

    Not really, just noticed it while freeing space on my computer, because as I specified SDK version 29, I expected Flutter to use it to build the app, but instead it redownloaded version 28. Now that version 29 is out and stable, I think Flutter should target it.

  4. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Sep 27, 2019
  5. escamoteur commented on Sep 27, 2019

    @escamoteur
    Contributor

    Thanks for bringing this to our attention

  6. added
    a: buildBuilding flutter applications with the tool
    t: gradle"flutter build" and "flutter run" on Android
    toolAffects the "flutter" command-line tool. See also t: labels.
    platform-androidAndroid applications specifically
    on Sep 27, 2019
  7. budioktaviyan commented on Oct 8, 2019

    @budioktaviyan

    I have same problem. I only need build tools 29.0.2 instead of using 28.0.3
    So, any update about this issue ? when the flutter team target this build tools to 29.0.2

  8. escamoteur commented on Oct 23, 2019

    @escamoteur
    Contributor

    @jonahwilliams do you know anything about the plan on this?

  9. solokingjec commented on Oct 25, 2019

    @solokingjec

    This is not a very good thing. I use a machine with small but efficient ssd storage so I deleted old android platforms so save space. When I started building, flutter downloaded the platforms again...

  10. added this to the milestone on Oct 30, 2019
  11. MaikuB commented on Nov 27, 2019

    @MaikuB
    Contributor

    Appear to have come across this problem as well. Had a plugin using Cirrus CI to build the example apps as part of the CI process I've setup. The apps and plugin have the compile and target SDK version set to 29. Builds end up failing (e.g. see https://github.com/MaikuB/flutter_appauth/pull/59/checks?check_run_id=303940871). Contacted Cirrus CI that then found this issue on GitHub

  12. AttSee commented on Dec 9, 2019

    @AttSee

    I have same problem.

  13. vincentderidder commented on Jan 19, 2020

    @vincentderidder

    Same issue here. Any news on this?

  14. jonahwilliams commented on Feb 4, 2020

    @jonahwilliams
    Contributor

    Gradle will download whatever build tools it requires - Flutter does not request these. I can't really provide any insight into why they are being downloaded, but it is possible some transitive dependency requires them for some reason.

  15. fkorotkov commented on Feb 4, 2020

    @fkorotkov
    Contributor
  16. jonahwilliams commented on Feb 4, 2020

    @jonahwilliams
    Contributor

    Thats a template file though, it is only meant to be a default. If plugins are compiling against 28, you'll need to download that tool regardless

  17. andy-g commented on Mar 4, 2020

    @andy-g

    @jonahwilliams is there any easy way to find out which plugins are targeting which sdk? I'd like to determine which plugin is forcing the download of the old android sdk as it's slowing down my CI build, and I may be able to bump that plugin version etc.

  18. SatyanarayanaGhadiyaram commented on Mar 15, 2020

    @SatyanarayanaGhadiyaram

    Installed the stable version of flutter today. I'm still facing this issue

  19. lock commented on Apr 4, 2020

    @lock

    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.

  20. locked and limited conversation to collaborators on Apr 4, 2020
  21. bartekpacia commented on Mar 30, 2024

    @bartekpacia
    Member

    For future readers: see my comment in a different issue

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

    a: buildBuilding flutter applications with the toolplatform-androidAndroid applications specificallyt: 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