Skip to content

"Open in Android Studio" option doesn't work #1521

Closed

Description

@audkar

Clicking this option does nothing. Can't find any errors printed or anything.

  • Opening Android project inside AS with flutter plugin works.
  • AS installed via Jetbrains Toolbox
  • Never tried this feature. Don't know if this is regression or it was never working.

Flutter doctor:

[✓] Flutter (Channel stable, v1.2.1, on Linux, locale en_US.UTF-8)
    • Flutter version 1.2.1 at /home/audrius/Documents/flutter
    • Framework revision 8661d8aecd (3 weeks ago), 2019-02-14 19:19:53 -0800
    • Engine revision 3757390fa4
    • Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /home/audrius/Documents/android-sdk-canary
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /home/audrius/Documents/android-sdk-canary
    • Java binary at:
      /home/audrius/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/183.5320907/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    • All Android licenses accepted.

[✓] Android Studio (version 3.3)
    • Android Studio at /home/audrius/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-1/182.5314842
    • Flutter plugin version 33.3.1
    • Dart plugin version 182.5215
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[!] Android Studio (version 3.5)
    • Android Studio at /home/audrius/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/183.5320907
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

Activity

  1. DanTup commented on Mar 9, 2019

    @DanTup
    Member

    Is there anything listed in the developer console (click Help -> Show Developer Tools in VS Code) when you click? I can't see an obvious path in the code that would cause it to fail silently. If we can't find the folder we show an error message, and otherwise we just try to execute it.

    Also, could you run flutter config --machine and paste the output here.

    Thanks!

  2. added this to the v2.25.0 milestone on Mar 9, 2019
  3. added
    in editorRelates to code editing or language features
    awaiting infoRequires more information from the customer to progress
    on Mar 9, 2019
  4. audkar commented on Mar 9, 2019

    @audkar
    Author

    Is there anything listed in the developer console (click Help -> Show Developer Tools in VS Code) when you click?

    No. Nothing printed after click.

    flutter config --machine and paste the output here.

    {
      "android-studio-dir":
      "/home/audrius/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/183.5320907",
      "android-sdk": "/home/audrius/Documents/android-sdk-canary"
    }
    

    Hmmm. Maybe problem is that android-studio-dir is set to AS versions which doesn't have Flutter plugin?

  5. DanTup commented on Mar 9, 2019

    @DanTup
    Member

    Maybe problem is that android-studio-dir is set to AS versions which doesn't have Flutter plugin?

    That shouldn't stop it from launching though.. All we're doing here is grabbing android-studio-dir then appending bin/studio and executing it. If you run /home/audrius/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/183.5320907/bin/studio from a terminal, does that work? If so, maybe it's failing somewhere else.

    I could try and add some more logging and give you a build (unfortunately I don't have a Linux box, and it works fine on my MacBooks), or if you want to try and debug it, it might be quite simple:

    • Clone this repo
    • Open in VS Code
    • Navigate to this code and add a breakpoint
    • Press F5, which will launch another copy of VS Code ("the dev extension host") running the from-source version of the extension
    • Open a Flutter project in that version, right-click on the Android folder and choose Open in Android Studio

    This should hit the breakpoint back in the main VS Code window, and you could step through to see if you can understand what's happening (or post more info that might help me understand).

    Otherwise, I should probably try and get a VM or something set up and see if I can repro there (in which case I'd be interested in knowing which distro you're using, and any instructions you think might be important to try and set things up similar to yours).

  6. audkar commented on Mar 9, 2019

    @audkar
    Author

    All we're doing here is grabbing android-studio-dir then appending bin/studio and executing it.

    Oh. My AS instalation in bin directory contains studio.sh instead of studio. So calling /home/audrius/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/183.5320907/bin/studio returns no such file or directory

  7. DanTup commented on Mar 9, 2019

    @DanTup
    Member

    Aha, I'll do some digging and find out if it should always be that way then. Windows and macOS are handled separately, so I think adding .sh should be easy if it's always that way on Linux. Thanks!

  8. added and removed
    awaiting infoRequires more information from the customer to progress
    on Mar 9, 2019
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

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions