Reputation: 791
I have the MacBook Pro with the new M1 chip with 8GB ram running Big Sur V11.1 and Android Studio 4.1.2. Over the course of a couple hours of work in Android Studio I can get 4 or so spinning beachballs of death where I need to do a force quit and occasionally Android Studio blinks out of existence all together.
I am not using the emulator. The lockups always seem to occur while I am in the middle of editing code.
I have run the Mac in safe mode and that might have slowed down the frequency of lockups, but not eliminate them. (I am not keeping count.)
I did do a data migration from my old Mac (a 10yr old Intel machine that never had this problem, just got to be too slow). Don't know if that has anything to do with the problem.
The only good aspect is that the machine is fast so I have been submitting a crash report every time!
Just wondering if anyone has any words of wisdom to fix this.
Upvotes: 5
Views: 3710
Reputation: 1244
I was facing the same issue, the way I solved this is I just deleted Android Studio and installed IntelliJ IDEA ultimate. Jetbrains have an IntelliJ IDEA version special for M1 processor and it works like a charm on my MacBook Air (8gb RAM). The only downside is you can only use IntelliJ IDEA ultimate for free if you're a student, if you're not you'll only get one month of free trial.
Upvotes: 0
Reputation: 350
Even with increased memory I faced similar issue. However managed to solve it by changing JDK used by Android Studio to M1 compatible JDK. I used Azul JDK. Make sure to set both JAVA_HOME & STUDIO_JDK variables. Also change the project sdk to M1 compatible JDK.
I use Azul 15.0.2+7 ARM 64-bit macOS version.
Update 23 May 2021 ****** I've switched to latest intelliJ, which has M1 support and installed all android plugins. So far my experience has been exceptional. Debugging can get slow at times, but rest is just fine.
Upvotes: 1
Reputation: 11
I had the same problem and after a little search i could fix it very easily... The problem of crashing comes because is not allocated enough memory to the “JVM”.
Go to: Finder->Applications. Right click on Android Studio. Select "Show package contents" Go to : Contents->bin. Right click on "studio.vmoptions". Select "open with"-> "textEdit". Copy the Text somewhere for backup, just in case you mess it up.
Just change the numbers as shown on the 3 line below. Leave everything else as it is.
-Xmx6154m
-XX:MaxPermSize=1024m
-XX:ReservedCodeCacheSize=200m
That should fix the crashes.
Upvotes: 0