与this one相同的问题。我在两个窗口上有两个android项目,当我通过单击Mac上的[x]图标关闭一个项目时,该项目已关闭,但该窗口存在空白屏幕。
我的Android Studio版本信息:
Android Studio 4.0
Build #AI-193.6911.18.40.6514223, built on May 20, 2020
Runtime version: 1.8.0_242-release-1644-b3-6222593 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.15.4
GC: ParNew, ConcurrentMarkSweep
Memory: 1979M
Cores: 12
Registry: ide.new.welcome.screen.force=true
Non-Bundled Plugins: org.jf.smalidea
Studio核心中的异常堆栈跟踪:
java.lang.IndexOutOfBoundsException: Index: 1, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:657)
at java.util.ArrayList.get(ArrayList.java:433)
at java.awt.Container.removeNotify(Container.java:2798)
at javax.swing.JComponent.removeNotify(JComponent.java:4759)
at com.intellij.ui.tabs.impl.JBTabsImpl.removeNotify(JBTabsImpl.java:553)
at java.awt.Container.removeNotify(Container.java:2807)
at javax.swing.JComponent.removeNotify(JComponent.java:4759)
at java.awt.Container.removeNotify(Container.java:2807)
at javax.swing.JComponent.removeNotify(JComponent.java:4759)
at java.awt.Container.removeNotify(Container.java:2807)
at javax.swing.JComponent.removeNotify(JComponent.java:4759)
at java.awt.Container.removeNotify(Container.java:2807)
at javax.swing.JComponent.removeNotify(JComponent.java:4759)
at java.awt.Container.removeNotify(Container.java:2807)
at javax.swing.JComponent.removeNotify(JComponent.java:4759)
at java.awt.Container.removeNotify(Container.java:2807)
at javax.swing.JComponent.removeNotify(JComponent.java:4759)
at java.awt.Container.remove(Container.java:1209)
at java.awt.Container.remove(Container.java:1267)
at com.intellij.openapi.wm.impl.IdeRootPane.setToolWindowsPane(IdeRootPane.java:192)
at com.intellij.openapi.wm.impl.ProjectFrameHelper$1.releaseFrame(ProjectFrameHelper.java:178)
at com.intellij.openapi.wm.impl.IdeFrameImpl.releaseFrame(IdeFrameImpl.java:158)
...
答案 0 :(得分:1)
自从更新到4.0(Windows)以来,我也遇到了这个问题。
现在,我刚刚从File > Close Project
关闭一个项目,对我来说很好。
答案 1 :(得分:0)
如果要关闭的项目已连接到仿真器设备,请先断开连接,然后再关闭它。我也遇到了这个问题,这种方法对我很有帮助。