I have a Hp envy notebook with Intel i7 and 8gb ram and 2gb graphics, still sometimes android studio stucks when I am working with xml or design the app. Is there any problem w
On Linux, try ZRAM (RAM compression). For Ubuntu:
sudo apt install zram-config
Then reboot.