在我的一些( flutter )应用程序中,我可以在工具窗口中运行 Android 模拟器。但在大多数情况下,我不能;模拟器窗口没有出现,也没有View > Tool Windows > Emulator
菜单项(以及其他缺少的工具窗口,包括 Profiler, App Inspection, Build Variants, Dart Analysis
和 Device File Explorer
)。
比较显示和不显示模拟器工具窗口的项目的设置,我没有发现任何差异。两者都具有相同的 Android SDK (11.0) 和 SDK 设置(相同的构建工具、平台工具等)。当然,相同的模拟器,以及在工具窗口中启动模拟器的相同设置。
所有应用程序在 Android Studio 模拟器中都可以正常运行,只是我是否可以在工具窗口中运行模拟器的区别。
这是一个错误还是我需要更改其他设置? (如有必要,我很乐意添加其他设置信息。)
我可以通过创建一个新的 flutter 项目来重新创建这个问题。这个问题我已经有一段时间了,但我目前的设置是:
Android Studio Arctic Fox | 2020.3.1 Patch 1 Build #AI-203.7717.56.2031.7621141, built on August 7, 2021 Runtime version: 11.0.10+0-b96-7249189 amd64 VM: OpenJDK 64-Bit Server VM by Oracle Corporation Windows 10 10.0 GC: G1 Young Generation, G1 Old Generation Memory: 1280M Cores: 4 Registry: ide.intellij.laf.enable.animation=true, external.system.auto.import.disabled=true, ide.balloon.shadow.size=0 Non-Bundled Plugins: com.mallowigi.idea, Dart, org.jetbrains.kotlin, io.flutter
最佳答案
经过额外搜索,我找到了解决方案posted here with screenshots似乎解决了我的问题。基本上,您点击 File
, Project Structure ...
选择 Modules
在项目设置中,然后是 +
您的项目的按钮。添加Android模块并点击OK
.
关于android - 为什么某些应用无法使用 Android Studio 的模拟器工具窗口?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68837250/