12

The same question as this one. I have two android projects on two windows, when I close one project by clicking [x] icon on my mac, the project closed but the window exists with a blank screen.enter image description here

My Android Studio Version info:

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

The Exception stack trace in Studio core:

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)
    ...
DysaniazzZ
  • 825
  • 15
  • 29
  • I have also updated it to Android Studio 4.0 but in windows, there is no problem. Is it happening multiple times or only once? Try killing the related process and open again and try closing to check if it is happening again. – Sonu Sourav Jun 09 '20 at 04:04
  • 1
    @SONUSOURAV It happens when I open more than one project and close one of it. Not always happen and not once actually. Kill the Android Studio process works, but it close all the projects I opened. – DysaniazzZ Jun 09 '20 at 06:02
  • Try reporting it here https://issuetracker.google.com/issues/new?component=192708&template=840533 – amar Sep 17 '20 at 08:06

2 Answers2

2

I have also experienced this problem since updated to 4.0 (Windows).

for now, I'm just closing a project from File > Close Project, that works fine for me.

AyTee
  • 489
  • 1
  • 8
  • 19
0

If the project you want to close is attached to emulator devices then please disconnect it first then close it. I also faced this problem and this approach helped me much.

Gk Mohammad Emon
  • 6,084
  • 3
  • 42
  • 42