9

After update to last beta release of macOS Big (11.0 Beta (20A5395g)) - Android Studio (4.1) keeps shutting because [NSOpenGLContext setView:] must be called from the main thread. This happens very often so I have to open AS every 5 minutes again and again

Also there are other issue - ANR (or very laggy functioning) that I was tolerating so far - related to opened sub-windows like

  • open ADV manager
  • creating new project - choosing activity for application
  • importing project from VCS.

BigSur beta is SO UNSTABLE so it drive me crazy. Do You recommend any AndroidStudio or macOS canary/beta channels that fix those issues?

EDIT 17.11.2020

Looks like after 2 installation of 11.0.1 problem is fixed

murt
  • 3,790
  • 4
  • 37
  • 48

3 Answers3

23

The IDE freezing when opening tabs is due to macOS's default settings. Go to System Preferences > General > Prefer tabs and select never.

Alternatively, you can run this command in Terminal if you want to keep tabs for all other apps except Android Studio (the ideal solution):

defaults write com.google.android.studio AppleWindowTabbingMode manual
Urmil Shroff
  • 487
  • 1
  • 4
  • 11
5

Any chance that you have external monitors connected? I'm experiencing the same issue and the crash happens whenever any Android Studio window is in the external monitors. This is a known and resolved JDK bug (see https://youtrack.jetbrains.com/issue/JBR-2790). I know of two workarounds, but they are both not ideal:

  1. Don't connect any external monitors, or...
  2. Change your JDK runtime to a version with the bug resolved:
    1. You will need to install a plugin to allow you to choose your runtime, see https://intellij-support.jetbrains.com/hc/en-us/articles/206544879-Selecting-the-JDK-version-the-IDE-will-run-under.
    2. Download and install a working runtime from https://adoptopenjdk.net/nightly.html?variant=openjdk11&jvmVariant=hotspot (i.e. version 11.0.9 works, no crashes but you lose some functionality such as accessing Preferences and Layout Editor)
    3. From Android Studio, choose the new runtime (Help > Find Action... > Choose Runtime...)

Unfortunately I have yet to find a runtime that doesn't compromise some kind of functionality in AS.

Andrew Wei
  • 4,335
  • 2
  • 16
  • 7
  • 1
    Are U kidding? :D I'll disconnect additional monitor and we will see – murt Oct 23 '20 at 10:59
  • 1
    Small addition to this. It's not when you open it on an external monitor, but when you open it on a non-primary external monitor. If you have an external monitor and set it as primary (by going to display settings and dragging the mini-menubar to it), IntelliJ will not crash on the external monitor, but trying to drag the window to your "built-in" monitor will crash it – Max Coplan Oct 29 '20 at 16:20
  • Using "jbsdk11b125_osx_x64.tar.gz" from Choose Runtime is working for me, even Preferences. Layout Editor still doesn't work like you said. I tried turning on the experimental layout rendering engine, but it crashed. – Greg Whatley Nov 08 '20 at 17:08
  • 2
    Good news: I've been using Big Sur 11.0.1 Release Candidate (20B5022a) for a few days now and I haven't been getting any crashes since. – Andrew Wei Nov 09 '20 at 19:11
  • 1
    I'm on Big Sur 11.0.1 (20B29) and it keeps crashing. Disconneting external monitor does not help. – Zeezer Nov 13 '20 at 13:12
-1

i did as what Andrew Wei said of the way2, i choose another runtime, it fixed this issue , but ererytime i open the layout design view or split view, it crashed again, i changed to other and other version runtime, one of this issue and crash on design view must be shown, so i choose the lesser of tow evils, i will use avd to view the layout instead of design view or split view.