1

I am doing the Android Basics: Data Storage course on Udacity, and I have almost finished this course, but since about a week ago while using Android Studio and doing everything that the course teaches me to do, at some point Android Studio completely freezes my Mac OS and that forces me to reboot my computer.

This problem happens at any time, literally. There wasn't anything special that Android Studio was trying to do when this happened. Many times I have been just writing some code, and it freezes, not running the project, downloading something in the app or checking anything special, it just suddenly freezes.

I am using Android Studio 3.2 (latest version) in a MacBook Pro (13-inch, Early 2011). It also happened before I update it to Android Studio 3.2, when I had the previous version I thought I could be fixed by delete Android Studio and download the latest version, but it did not work.

Juan Borges
  • 15
  • 2
  • 6
  • What's the RAM size? – Deepak Kumar Sep 30 '18 at 03:26
  • a desktop machine with >= 16GB RAM might show whole different behavior. portable computers are rather suitable for web-scripting, not for developing with a massive SDK. even the IDE's inline code-inspection makes machines with little performance stall, already. just compare the number of pins of a DIMM vs. SO-DIMM module and see the bottleneck there. – Martin Zeitler Oct 08 '18 at 02:14

4 Answers4

3

I have a solution for this problem.

I seem to have a problem occurs with the Java version of Android Studio crashes

So check your Java version. I think you are using JAVA 1.8 Please remove all java on your system like below.

sudo rm -rf /Library/Java/JavaVirtualMachines/jdk1.8.0_80.jdk/

then download and reinstall latest java 1.8

https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

I will hope you can resolve this problem

areema
  • 241
  • 2
  • 3
  • I was having similar issues on two different macs. Android Studio would completely freeze my mac and require a hard reset. At first I thought it was due to emulators, but then it would occur even when no emulator was running and I was signing an app for release. I followed the advise of areema (deleted a jdk-11.0.1.jdk and installed the latest from Oracle) and that did the trick (at least once). Will see what happens over time. – Mike Dec 23 '18 at 16:04
  • If someone who doesn't work these solution, please use Android studio 3.2 canary 1. It really works fine. https://developer.android.com/studio/archive?hl=ko – areema Dec 25 '18 at 12:48
0

I had something similar after updating to 3.2. Wasted 4 hours trying to fix it and eventually followed these instructions to totally wipe AS from my PC. How to completely uninstall Android Studio from windows(v10) I understand that you have MacOS but it wouldn't be too difficult to locate the directories there.

Itamar Kerbel
  • 2,508
  • 1
  • 22
  • 29
0

If your machine freezes, it could be due to either you open too many apps that consume much RAM with Android Studio, hence when Android Studio needs some more RAM to operate (i.e during gradle build or instant run), the machine could not provide sufficient RAM hence, Android Studio will freeze: or your machine does not meet minimum system requirements for Android Studio, for this information, you can check the official documentation https://developer.android.com/studio/ . Also, in order to manage memory usage, have a look on this link https://macpaw.com/how-to/reduce-memory-usage-on-mac

0

For those who are looking for a solution when is using tabs just is because

Android Studio freezes on macOS Big Sur. On machines running macOS Big Sur, Android Studio 4.1 might freeze when you open a dialog.

To work around this issue, do one of the following:

Go to the Apple Menu, select System Preferences > General. In the Prefer tabs when opening documents option, select "never". Then restart Android Studio.

Upgrade to Android Studio 4.2, currently available in the Beta channel.

Otherwise, wait for the Stable Android Studio 4.2

DariusV
  • 2,645
  • 16
  • 21