Can I run the Android Emulator within (or on top of) the Android Studio window?

后端 未结 3 894
情书的邮戳
情书的邮戳 2021-02-07 06:19

I use Android Studio on macOS in full screen (maximised). When launching the Android Emulator, its window is shown on the regular desktop. This requires switching from one windo

相关标签:
3条回答
  • 2021-02-07 06:51

    With Android Studio 4.1 and above you can run the Android Emulator directly in Android Studio.

    To run the emulator in Android Studio, make sure you're using Android Studio 4.1 with version 30.0.10 or higher of the Android Emulator, then follow these steps:

    1. Click File > Settings > Tools > Emulator (or Android Studio > Preferences > Tools > Emulator on macOS), then select Launch in a tool window and click OK.

    2. If the Emulator window didn't automatically appear, open it by clicking View > Tool Windows > Emulator.

    3. Start your virtual device using the AVD Manager or by targeting it when running your app.

    For more info: Run the Android Emulator directly in Android Studio

    0 讨论(0)
  • 2021-02-07 06:55

    This is not a 100% answer, but near to it and since it doesn't fit in comments, I'll write it here. Hopefully we can turn it into a 100% answer.

    It is possible to do this with applications that supports full screen mode. Unfortunately the Android emulator does not do this. Genymotion does.

    There seem to be hacks to activate full screen mode for applications that don't support it natively. For example, for the iOS simulator, you have to run this on a terminal:

    defaults write com.apple.iphonesimulator AllowFullscreenMode -bool YES
    

    A Google search returns several results to do this with the Android Emulator: https://www.google.com/search?q=how+to+run+android+emulator+full+screen&rlz=1C5CHFA_enDE822DE822&oq=how+to+run+android+emulator+full+screen&aqs=chrome..69i57.6269j0j9&sourceid=chrome&ie=UTF-8 I've not tested any of them, so that's left as an exercise to the reader. If you do successfully please write it in the comments (or directly edit this post with the steps).

    It may also make sense to make a feature request on the emulator to enable full screen mode.

    Once you have an emulator/simulator that supports full screen mode, you can use MacOS's split view feature. In order to do this:

    • Press and hold the full screen button on Android Studio (while not in full screen mode).
    • Move it to the left part of the screen.
    • Now in the right part you will see "candidates" to share the full screen with. Your simulator/emulator should appear here. Click on it. It should expand to fill the right half of the screen.
    • Drag the handle between the left and right part to the right, such that Android Studio occupies more space.

    See https://support.apple.com/en-au/HT204948

    0 讨论(0)
  • 2021-02-07 07:07

    I also looked into this and there doesn't seem to be any support for this. Perhaps you could write a plugin that somehow wraps an external window inside a panel, I don't know if the IntelliJ API supports it though.

    The closest thing you got on macOS is the split-screen mode with full-screen apps.

    0 讨论(0)
提交回复
热议问题