Repository: flutter
Issue: "Unable to determine Android Studio version" in flutter doctor when Android Studio is installed via Flatpak
Labels: platform-android,tool,t: flutter doctor,P3,team-tool,triaged-tool

### Steps to reproduce

When running "flutter doctor" command in Linux terminal, it gives "Unable to determine Android Studio version" issue althoug I've a flathub version of Android Studio installed.

There's alreaady a case on this issue #135662 but closed. Please also see the attached screenshot debuggin "flutter tool" in VS Code.

Thank you so much :)

```
Android Studio Hedgehog | 2023.1.1
Build #AI-231.9392.1.2311.11076708, built on November 9, 2023
Runtime version: 17.0.7+0-17.0.7b1000.6-10550314 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 6.2.0-37-generic
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 4
Registry:
    external.system.auto.import.disabled=true
    debugger.new.tool.window.layout=true
    ide.text.editor.with.preview.show.floating.toolbar=false
    ide.experimental.ui=true

Non-Bundled Plugins:
    Dart (231.9409)
    io.flutter (77.1.2)
```

Current Desktop: X-Cinnamon

### Expected results

No issues 

### Actual results

    ✗ Unable to determine Android Studio version.
! Doctor found issues in 1 category.


### Code sample

<details open><summary>Code sample</summary>

```dart
[Paste your code here]
```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

![fd_bug](https://github.com/flutter/flutter/assets/61664410/17a98950-40b7-48a0-8cb6-31491ea5fc83)


</details>


### Logs

<details open><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.16.5, on Linux Mint 21.2 6.2.0-37-generic, locale en_US.UTF-8)
    • Flutter version 3.16.5 on channel stable at /home/volkan1/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 78666c8dc5 (4 days ago), 2023-12-19 16:14:14 -0800
    • Engine revision 3f3e560236
    • Dart version 3.2.3
    • DevTools version 2.28.4

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /home/volkan1/Android/Sdk
    • Platform android-33, build-tools 34.0.0
    • ANDROID_HOME = /home/volkan1/Android/Sdk
    • Java binary at: /var/lib/flatpak/app/com.google.AndroidStudio/current/active/files/extra/android-studio/jbr/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • Ubuntu clang version 14.0.0-1ubuntu1.1
    • cmake version 3.22.1
    • ninja version 1.10.1
    • pkg-config version 0.29.2

[!] Android Studio (version unknown)
    • Android Studio at /var/lib/flatpak/app/com.google.AndroidStudio/current/active/files/extra/android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    ✗ Unable to determine Android Studio version.
    • android-studio-dir = /var/lib/flatpak/app/com.google.AndroidStudio/current/active/files/extra/android-studio
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)

[✓] VS Code (version 1.85.1)
    • VS Code at /usr/share/code
    • Flutter extension version 3.78.0

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Linux Mint 21.2 6.2.0-37-generic
    • Chrome (web)    • chrome • web-javascript • Google Chrome 120.0.6099.129

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

```

</details>