Do I need to upgrade RAM from 4GB to 8GB for Android development?
Solution 1:
The recommended amount of RAM for running Android Studio Ubuntu is 8GB, and your computer has only 4GB of RAM. You should expect to get not better than minimal performance from hardware that meets only the minimal requirements for Android Studio, and you should expect to get recommended performance from hardware that meets the recommended requirements.
As you get deeper into Android Studio you'll find out again and again what a resource hog it is. Android Studio is a very feature rich IDE, and you need to give it more resources in order to use all of its great features. In addition to the RAM having a decent graphics card would also help.
Solution 2:
Not only an Android IDE a resource Hog, but you will need from time to time one, sometimes more, android emulators, and those eat even more RAM. I'd consider 8Gb barely enough.
But!
At the same time, there is a quirk with Linux memory usage that you should know of. Read this: Linux ate my RAM Resource monitor is not a way to judge RAM usage, the free
tool is.