I’m currently thinking about switching from Windows to Linux on my next Laptop and would like to know what your experiences are on Developing for Android on Linux, especially performancewise maybe someone made a comparison to Windows and made the same switch?
Your laptop has a nVidia GPU? Linux is pure trash with nVidia (v-sync issues, freezes, artifacts, etc.). For good hardware, Windows is the best in the market, unfortunately (but I would rather use Windows 10. 11 is pure trash).
But, if your laptop has an AMD gpu, maybe it is capable of running MacOS (I run MacOS on a PC). MacOS is crappy as hell as an GUI, but the OS is solid. I would consider a Linux with better-ish UI/stability.
BTW, performance-wise, Android Emulator requires a good GPU support, and this is only good in Windows (both Linux and MacOS are worse for that). You could try GitHub - Genymobile/scrcpy: Display and control your Android device. Never tried in Linux, but in MacOS it has issues with v-sync (because Metal doesn’t support or something like that).
TL;DR - If you need GPU, the best OS is Windows.
I’ve been using Linux (Ubuntu) for Android development since the Eclipse days before Android Studio and have always been happy with it. In the last 5 years I switched to Flutter with first AS and now VSCode and have likewise been very happy continuing to do so.
Performance wise since I have no interest in gaming or running local LLMs I’ve always avoided nvidia gpus and used intel or amd gpus happily. Recently amd seems to have significant performance/watt lead over intel so my last 2 laptops have been amd apus. I find performance more than adequate for my Android development needs.
Unfortunately Thomas I can’t comment much on a comparison with Windows as I haven’t used Windows to do Android or Flutter dev.
Thomas if you are a long time windows user, I think the main thing to look out for is the very different ux of using Linux over Windows, though at least your muscle memory for short cut keys won’t drive you insane like it would switching to macos.
In terms of having a reliable work machine, I’d recommend buying from a vendor that eitehr sells machines with linux preinstalled or directly supports Linux, there are plenty to choose from these days.
Karabiner-Elements solves this issue (i.e.: I use all my Windows shortcuts keys in MacOS - some of them are from the old Visual Basic 6.0 - Ctrl+Y is to delete the entire line =P)
You shouldn’t have issues on linux, maybe it’s even more straightforward to do some tooling. I never really developed on windows.
I have a 3 year old mini pc with an amd ryzen 5700g processor. First compiles after package changes take around ~30 seconds, but compiles after that take less than 5 seconds.
Laptops won’t be as fast as a desktop device. I also have a laptop with AMD Ryzen™ 7 7730U which has the same amounts of threads and it’s newer, but the compile times are ~50% longer. Laptop power limitations I guess. I could have spent more on the laptop, but I don’t think the price-performance ratio is much better on more expensive laptop, while with non laptop devices you will get better ratio.
Most of the time I remote connect to my desktop mini pc and develop there. I basically use the mini pc as a second screen, it displays the emulator and other stuff. I also figured out how to see on my laptop the emulator running on the mini pc, so I don’t even have to be home to use the mini pc for development. This way you can have a weaker/slimmer laptop, that only needs to run the vs code remote session, it won’t do any compilation or emulation.
I even managed to install macos under qemu, it even runs the iphone simulator.
Don’t get a laptop with nvidia gpu.
Made a guide on how to use a stronger linux machine for remote development: Guide: Start an android emulator on your remote linux system
I didn’t make the switch, instead, I am using both platforms. My main workstation for coding Dart and Flutter is an Intel NUC with 32 GB RAM and an Intel core i5 CPU running Linux 22 Wilma (Xfce Edition) as single OS.
When travelling, I am using a Windows 11 laptop with 16 GB RAM and again an Intel core i5 CPU. Using Windows gives me the flexibility of testing native Windows apps as well.
In terms of performance, I don’t see a big difference. Visual Studio Code works well on both platforms. Fast reload is near instantaneous and build times seem marginally faster on the Linux system. I deliberately chose CPUs (and for the workstation M.2 SSDs) with a low thermal design power since I value silence more than slightly faster build times. For this reason, the NUC board is mounted in a fanless Aluminium enclosure.
Setting up git and remote access seemed more straightforward on Linux. When getting the NUC, I made sure that the hardware is suited for Linux.
Hey @escamoteur, if you’re still trying to make up your mind, I’d be happy to weigh in - my desktop dual boots Windows and Linux, so I could attempt some side-by-side comparisons, if you know what metrics you’re looking for.
Thanks, in the meantime I got a very fast Thinkpad and installed dual boot.
Currently the main reason that I stick with windows is that I really love the Fork git client and that’s not available for Linux
Hmm. My girlfriend uses Fork, but I have not tried it, myself. I find that VSCode’s git integration is wholly sufficient for me, and if I need more GitKraken is a decent option.
Fork is really amazing. It takes git to whole different level