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