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

Android Studio Emulator cannot be embedded for Flutter project #5910

Closed
Gabriel2048 opened this issue Jan 19, 2022 · 9 comments
Closed

Android Studio Emulator cannot be embedded for Flutter project #5910

Gabriel2048 opened this issue Jan 19, 2022 · 9 comments
Labels
ide-consistency Issues where we are not up to date with IDE
Milestone

Comments

@Gabriel2048
Copy link

Gabriel2048 commented Jan 19, 2022

This issue is a parity inconsistency between regular Android projects and Flutter Android projects.
Apparently this is not a bug within Android Studio as there are some complains (here or here(this also has an technical explanation that might be valuable)) about it in the Android Studio's issue tracker and they mention this should be addressed to the Flutter Plugin team.

Steps to Reproduce

1)Create a new Flutter project using the flutter plugin
2) Go to Settings > Tools > Emulator
3) Check "Launch in a tool window" option
4) Save changes and close the settings window.
5) Go to AVD manager and start an emulator

Actual result: The emulator is being started as a new windows app (see attached screenshot).
Expected result: The emulator is started in the tools section of Android Studio (embedded).
image

Version info

[√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.22000.434], locale en-US)
• Flutter version 2.8.1 at C:\dev\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 77d935af4d (5 weeks ago), 2021-12-16 08:37:33 -0800
• Engine revision 890a5fca2e
• Dart version 2.15.1

[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
• Android SDK at C:\Users\iliec\AppData\Local\Android\sdk
• Platform android-32, build-tools 32.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
• All Android licenses accepted.

[X] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[√] Android Studio (version 2020.3)
• Android Studio at C:\Program Files\Android\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
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[√] VS Code (version 1.63.2)
• VS Code at C:\Users\iliec\AppData\Local\Programs\Microsoft VS Code
• Flutter extension can be installed from:
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[√] Connected device (2 available)
• sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64 • Android 12 (API 32) (emulator)
• Edge (web) • edge • web-javascript • Microsoft Edge 96.0.1054.62

! Doctor found issues in 1 category.

@stevemessick
Copy link
Member

The Flutter plugin does not launch the emulator in an embedded view. To do that you need to use the Android Studio Device Manager. If you don't see the Device Manager in the View > Tool Windows menu then refer to #5464 for details on adding an Android module to your project, which will enable it.

@stevemessick stevemessick added this to the On Deck milestone Jan 20, 2022
@Gabriel2048
Copy link
Author

@stevemessick Thank you, the fix you mentioned in here is working, I am now able to launch the emulator in the tools window.
However, wouldn't it make sense to have the flutter plugin add the module automatically when creating the project in the first place?

@stevemessick
Copy link
Member

Yes, that is the topic of #5464. I'm leaving this issue open as a reminder to added embedded launch mode to the Flutter plugin.

@Gabriel2048
Copy link
Author

@stevemessick I see you closed #5464 so I assume this item can also be closed

@stevemessick
Copy link
Member

@Gabriel2048 I don't know. I have not tested this feature yet.

@stevemessick
Copy link
Member

No, this issue is not fixed. However, I'm closing it as a dup of #5917, since that one is asking for even more.

@stevemessick
Copy link
Member

Re-opening since the other has two topics and this isn't the first.

@stevemessick stevemessick reopened this May 20, 2022
@helin24 helin24 added the ide-consistency Issues where we are not up to date with IDE label May 31, 2022
@pedromassango
Copy link
Member

pedromassango commented Dec 9, 2022

@stevemessick isn't this fixed by #6279?

@stevemessick
Copy link
Member

Yes, thanks. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ide-consistency Issues where we are not up to date with IDE
Projects
None yet
Development

No branches or pull requests

4 participants