Android\Sdk\system-images vs .andoid\avd - android-emulator

On my PC, Android\Sdk\system-images uses 22GB and .andoid\avd uses 49 GB.
I need those emulators. Do I still have to keep Android\Sdk\system-images to run those emulators? My assumption is that they are needed to create emulators. I wonder if they are still needed once the emulators are created.

Related

Flutter run in vscode taking unexpectedly long time

I am using vs code for flutter dev for the first time, while trying to run the app, it's showing me "this is taking an unexpectedly long time".However it builds the application, but takes around 17 mins. Any help??
So, I am a Windows PC user with 4GB RAM and i3 processors. I know the thing you're thinking. "Why is it taking so much time?" Believe me, I go through it a lot. Actually, it is not your fault or Flutter's. It is because of the slow PC.
Usually, the 1st run takes time. It has to build packages and stuff. So, it will take time. After the first build, as and when, new dependencies are added, the run time may increase. But after the first build, it runs faster.
Another issue I've found when building Flutter apps onto a physical Android device specifically, is that ADB may be causing the slow performance.
So running:
adb kill-server
Then unplugging and replugging the device and then:
adb start-server
Followed by:
flutter run
Increased performance
I am a windows user. My pc has a core i5-4200u(2 cores, 4 threads) with only 6GB ram.
If you are trying to run the app in an android emulator or in an android device try this.
Add following lines to the gradle.properties file found in your android folder in your project directory.
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.configureondemand=true
org.gradle.caching=true
Checkout these 3 links for more information
https://www.journaldev.com/12333/increase-gradle-build-speed
https://medium.com/#AthorNZ/how-to-speed-up-your-slow-gradle-builds-5d9a9545f91a
https://www.youtube.com/watch?v=7ll-rkLCtyk
Earlier I had build times like 200s or more. But after enabling these features my build times got significantly lower.
In the first run you won't notice a massive difference. But after that your build times will reduce massively.
After doing all this I got like 40s or less build times.
The build time without the changes mentioned above
The build time in the first run after the changes
The build time in the second run after the changes
Please note that I have only changed the gradle.properties file to improve build times.

Can't run emulators on a PC with Core 2 cpu

For the last few days I had been searching all over the internet for an answer as to why I can't run emulators on my computer. Turns out that Intel HAXM is not supported on the Core 2 architecture.
Does anyone know if I can somehow make emulators run, despite those limitations?
Turns out there really isn't a workaround for this problem. The only solution is to simply use a phisical device.

Flutter with VS Code and emulator taking too much ram

I just want to ask, im running flutter with vs code and android emulator using my Acer Aspire 3 (Ryzen 5 2500u and 8gb ram 6.9gb usable).
When i run the emulator suddenly my laptop was slow and when i check task manager my ram usage is reaching 98-99% due these Open JDK, vscode, emulator, dart, etc. Is it normal? I saw the requirement on flutter website and i think my spec its not problem. Any one know how to fix this issue?
Sorry for my bad English Thanks in advance.
This is a very common issue that I faced personally. After wasting a lot of time at the slow laptop, I decided to upgrade my RAM & now it works better.
Assuming that a normal Flutter developer uses the following programs at any given time -
Chrome (~1.5 GB)
(Obviously for StackOverflow, Github, Music, Surfing etc. Minimum 5 - 8 tabs open)
VS Code (~1 - 2 GB)
For running project(s) (Sometimes I have to switch b/w multiple projects)
Emulator (~1.5 - 2 GB)
Easily consumes a lot of RAM.
Your OS (Windows/Linux/Mac (~1.5 - 2 GB)
Your OS may consume 1.5 - 2 GB RAM with no programs running. If it is consuming more, then try restarting your laptop.
I have upgraded my RAM to 16 GB now. Now, my normal usage goes to 7.6 GB (around 50% RAM usage).
If you are using Android Studio, then you will have even less RAM. It is really heavy (2.5 GB+, in some cases). I personally use VS Code as it is light-weight.
An alternative can be to use an actual mobile device, instead of an emulator.
My computer with Intel Core i7 - 4770 and 12 GB RAM is much worse.
Android Tablet Emulator used up to 3.96GB RAM. 8 Tasks of Dart.exe used up to 3.6GB of RAM. VSCode only used up 1.6GB. I only open one Flutter project, one Node.js project.
I used the recent version of Flutter 3.04. The computer is so much slow and very lag. I only opened one Edge browser too. I really hope Flutter team can fix this thing. I don't have any budget yet to buy Android tablet for this startup project. Android emulator is my only option.

Emulator in AMD Processor is not working

I using AMD processor. I have installed everything related to eclipse perfectly. But I'm unable to start the emulator. program is hang and keep waiting for adb forever. The same issue in android studio also. Please give a solution.
I'm using a Android Studio on an HP x360, which is a nice little laptop but has a puny processor:). I spent ages getting the Intel Hax virtual machine thingy installed on my machine, as well as configuring bios (which I found AVAST blocked changes to, so had to uninstall it).
After probably hours this week (I'm new to Android) waiting for the emulator to do it's thing, start up, load program, and eat memory, I decided to plug in my phone (Moto-e).
This has made a massive improvement! Only takes a minute to compile and run now! You also have piece of mind that your app will run in the real world.
So as a newb to Android, I'd say don't bother with the emulator.... plug a real device in.
See here for setting up HAXM, if you have trouble installing, it may be antivirus etc blocking it....
Intel HAXM
All the best.
try these threads Virtualization threads

Is MOTODEV faster than the Android Emulator?

I am running the Android SDK inside a Windows XP VM in VMWare. As such, the Android Emulator takes forever to boot...
I have recently heard of another emulator -- the MotoDev. For those of you who tried both, could you tell if the MotoDev has any speed advantage over the standard Android Emulator?
I'm the Product Manager for MOTODEV Studio. There is not a separate emulator inside Studio, but rather another view of the existing emulator process that is displayed inside an Eclipse View. It's no faster than what you already have and depending on which transfer mechanism you use (native window vs. VNC), it could be up to 20% slower (native window is faster for Windows and Linux).
Now, as for why your emulator is taking forever...
The first time you start an emulator image (i.e. "AVD"), it has to recreate the entire target filesystem on your local disk. Subsequent launches will take less time.
If I understand correctly, you're letting the Android emulator pretend it's running its' file system through QEMU (Arm Emulator) inside a Windows XP pseudo-file system (VMWare Disk Image) that's running on whatever host operating system you have (your OS). That's a lot of file system manipulation going on. If you can reduce the file system mapping, you're going to see speed improvements. Can you map the Windows Android SDK into a real folder on your native file system? Removing that layer of abstraction is going to speed things up.
Good luck!
Eric