News for hackers. Stuff that matters.
Re:Android Studio 4.0 by qwerty456127 on Thursday May 28, 2020 @08:13PM (#23344750)
Why does Android dev has to be this much heavier than any other task? I'm ok doing .Net, Scala and Python dev (always using the most powerful IDEs), some lo-fi machine learning, running Windows and Linux and heavy Windows apps in VirtualBox, but Android - can't emulate.

What I have resorted to is writing single-page JavaScript apps and running them in the browser so I can debug them in the host browser instead of an emulator.

Re:Android Studio 4.0 by kelnos on Thursday May 28, 2020 @09:27PM (#23345313)
Remember that we're talking about emulating an entire system here, which is very different from running an IDE (even considering that an IDE like IntelliJ is pretty heavy-weight).

Windows and Linux themselves in a VM is probably reasonably ok on your hardware because both of those OSes are built to run on non-current hardware (especially Linux; I'm running Debian buster with a current kernel on a circa 2010 single-core ARMv5 CPU with 256MB of RAM with no problems).

Android doesn't target old hardware; I wouldn't expect a current release to run all that well even on a four-year-old phone, let alone a 10+-year-old laptop with virtualization overhead.

Also the usual stuff applies: be sure you have your system's virtualization extensions enabled if it has any, use the x86 Android emulator image with hardware accel enabled, not the ARM one, etc. But that still may not be enough.

Re:Android Studio 4.0 by mwcampbell on Thursday May 28, 2020 @09:39PM (#23345401)
> circa 2010 single-core ARMv5 CPU with 256MB of RAM

Just curious, which board is that?

Re:Android Studio 4.0 by RussianCow on Thursday May 28, 2020 @08:38PM (#23344958)
How are you doing all of those things with only 4GB of memory? My wife's old laptop had 3GB, and with about 10 Chrome tabs open, the computer would start swapping and quickly grind to a halt—with no other programs running in the foreground. I just checked memory usage on my own machine and Firefox alone is using over 3GB for me, and IntelliJ another 4GB. Granted, I know many programs tend to use more memory if it's available (for caching, etc), and I also hardly ever restart my machine, but still... Running a full dev environment with 4GB doesn't seem like it should be possible, so I'm curious how yours is so functional.
Re:Android Studio 4.0 by qwerty456127 on Friday May 29, 2020 @06:12PM (#23356155)
I usually have about 50 open Chrome tabs (on my Core2Duo with 4GB RAM). Half of them YouTube (I mostly watch 360p though, I only switch to 1080p when I watch somebody coding). This could get slightly slow occasionally when I used a HDD, not even slightly slow now as I switched to an SSD. I usually have PyCharm open so I code at the same time while watching something. I only experience some minor slowness when I run a system (Manjaro) update in the background and when PyCharm re-indexes libraries after an update.
Re:Android Studio 4.0 by ac29 on Thursday May 28, 2020 @09:22PM (#23345273)
Does your Core 2 Duo processor support hardware virtualization extensions (VT-x)? Some do, some dont. If it doesnt, you'd get no acceleration in the Android Emulator, so it would be expected to be pretty slow.
Re:Android Studio 4.0 by qwerty456127 on Friday May 29, 2020 @04:15PM (#23354960)
Mine does and I wouldn't be shocked by Android being that slow if normal Linuxes didn't work perfectly. People say that's because Android lacks proper virtual video card drivers.
Re:Android Studio 4.0 by fomine3 on Thursday May 28, 2020 @08:46PM (#23345007)
Modern Android devices have almost similar (or sightly less on low-end) specs as your laptop. And your laptop should run IDE and emulator. No reason to run comfortably.
Re:Android Studio 4.0 by qwerty456127 on Saturday May 30, 2020 @06:14PM (#23365254)
You miss a point: an app I need to run in the emulator is extremely simple, almost "hello world"-like. The OS itself shouldn't take much resources. I would expect 99% of the CPU and 80% of the RAM to be unused when running such a humble app on a bare OS. Another point is I actually have VT-x so x86 Linux and x86 Windows can normally be emulated without much overhead but x86 Android is a different story.