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

flutter doctor should explicitly say when it can't find Android Studio version #122081

Closed
gnprice opened this issue Mar 7, 2023 · 5 comments · Fixed by #126395
Closed

flutter doctor should explicitly say when it can't find Android Studio version #122081

gnprice opened this issue Mar 7, 2023 · 5 comments · Fixed by #126395
Assignees
Labels
P1 High-priority issues at the top of the work list platform-android Android applications specifically tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@gnprice
Copy link
Member

gnprice commented Mar 7, 2023

When the tool isn't able to identify what version an Android Studio installation is, that can cause the build to fail because some logic depends on the Android Studio version. For example:

So when someone's running flutter doctor -v because things have gone wrong, the fact that the Android Studio version couldn't be identified is potentially a quite important clue for resolving the problem.

Currently, though, the flutter doctor output just suppresses mention of the version when it doesn't know the answer:

    // in [AndroidStudioValidator.validate]
    final String? studioVersionText = _studio.version == Version.unknown
      ? null
      : userMessages.androidStudioVersion(_studio.version.toString());

The result is a line like

[!] Android Studio

instead of like

[✓] Android Studio (version 2022.3)

This is too subtle; e.g. in #121925 it wasn't noticed in the first few rounds of debugging. It should instead say something like:

[!] Android Studio (unknown version)

or perhaps somewhat louder than that.

@gnprice gnprice added platform-android Android applications specifically tool Affects the "flutter" command-line tool. See also t: labels. labels Mar 7, 2023
@surajsahani

This comment was marked as off-topic.

@christopherfujino christopherfujino added the P1 High-priority issues at the top of the work list label Mar 7, 2023
@gnprice

This comment was marked as off-topic.

@christopherfujino
Copy link
Member

cc @andrewkolos

@andrewkolos
Copy link
Contributor

This likely applies to the VSCode validator as well:

final String? vsCodeVersionText = _vsCode.version == Version.unknown
? null
: userMessages.vsCodeVersion(_vsCode.version.toString());

@andrewkolos andrewkolos self-assigned this Apr 14, 2023
auto-submit bot pushed a commit that referenced this issue Jun 1, 2023
… not be detected. (#126395)

Fixes #122081.

When validating an Android Studio installation, add a warning validation message when we are unable to detect the version. This is because we have logic throughout the tool (JDK/JRE-searching) that is at higher risk of failing when we don't know the version.
@github-actions
Copy link

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 Jun 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P1 High-priority issues at the top of the work list platform-android Android applications specifically tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
4 participants