How to enable Android Studio AVD to use only lesser number of CPUs than available on the computer

To use only 2 cores of the CPU of the computer, do the following action after opening a terminal window in Linux, where Device10.avd is the Android 10 AVD created:

$ vi ~/.android/avd/Device10.avd/config.ini <enter>

Change the values in red for the below parameters in the file to those in blue as below.
hw.cpu.ncore=4

hw.cpu.ncore=2

Save the file and restart Android Studio. This should reduce the risk of the system crashing.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s