Android Studio crashes on MacBook Pro 2012 after Sonoma Update [SOLVED]

Paolo Montalto
2 min readJun 17, 2024

I’ve got a 2012 MacBook Pro which still works great for everyday use and mobile devlopment. I kept it successfully up and running all these years thanks to OpenCore Legacy Patcher project.

But since updating to the latest macOS iteration I started experiencing Android Studio unexpected crashes.

At the beginning I wasn’t able to detect the cause but eventually I managed to understand the problem: Android Studio would’t start at all with an exernal monitor attached to my MacBook and would crash when connecting one.

From there to solve the issue I had to to go past several tries, reading system logs and searching on the internet but in the end I succeeded in fixing it.

The crashes were due to the Metal GPU in my MacBook Pro so I had to start Android Studio via command line adding the following JVM parameter: -Dsun.java2d.metal=false

You will agree that starting Android Studio from the command line everytime you need to use is at least annoying but you’ll find that the solution is close at hand.

Just find the studio.vmoptions file for your Android Studio version, mine was at the following path

/Users/[my_username]/Library/Application Support/Google/AndroidStudio2024.1/

and add the said JVM parameter at the top of the file:

Piece of cake! 😜

Your experience and opinions are welcome in the comments.

--

--

Paolo Montalto

Android Engineer, freelance, mobile developer, software craftsman, guitar strummer, husband, father, humble.