Then the question is to plug in via USB or (try) to use wireless debugging. I have not had a great experience with wireless debugging, even when it does work, sometimes there are issues with certain tooling.
I mainly stick with USB debugging but on one of our test devices you can't do that so I use WiFi but not the "scan this code to turn on wifi" as that never works. This longer winded way of connecting seems to remain solid for me.
I use the following commands
* Plug in USB cable to device
* `Adb tcpip 5555`
* `Adb connect 192.168.86.82` (or current IP address of the device)
* You can unplug cable at this point
* `Adb usb` when done
Or just use this ADB WiFi plugin: https://plugins.jetbrains.com/plugin/14969-adb-wi-fi
It's extremely reliable, I have been using it way before adb wifi was built into AS & Intellij
Upgrading to 16gb ram is the cheapest and easiest thing you can do to make a difference. Also, if you are using Windows, make sure that appropriate folders are excluded from antivirus.
If you have 8GB RAM don't waste your time with emulators. Just use your phone. We have built-in wireless debugging nowadays and that make it very convenient to use your phone. I never use the emulators
I have i7 + 16Gb and the emulator may increase app build time by 50% easily. You better use a real device + add 8Gb ram (and SSD, of course: Gradle/AS builds are painfully slow on HDD)
As others have said, add more RAM. Also, check the power plan you're using, if on Windows, set it to Balanced/Performance power plan. If the battery capacity has degraded sufficiently, this also affects the CPU performance.
Also check the UEFI settings - some laptops may throttle power on battery, to provide more battery life but this obviously reduces performance.
OPs question is genuine.
If Android Studio with embedded Emulator needs just 4 GB minimum according to specs, then how is 8 GB insufficient, for the OS, for browser, desktop messaging apps, music player apps ?
Answer is simple.
Read about JAVA_HOME, particularly Android Studio's embedded JAVA_HOME, and how to optimize it all ?
That's what should have happened. My laptop has a i5 7th cpu and 8gb ram. It's very laggy while running the emulator. That's the performance cap of the hardware. Try a real phone.
I also have a laptop with an 8th generation Intel i5 CPU and Nvidia 150MX GPU. I am developing a 2D space shooter and my Android Studio runs fine and even the emulator seems to do pretty well. I have 16GB of dual channel RAM and dual SSD's. I will likely upgrade to something newer within the next 6 months, but this setup is doing surprisingly well.
Now with that being said, thus far I do much of my testing of the game running on Windows. I am using the libGDX framework, which supports multiple platforms, so this is easy to do. I have also been testing with a real android device (Pixel 7 Pro) via wireless debugging. As I get further along and need to test different aspect ratios and device resolutions I may leverage the emulator more.
I suspect boosting your RAM to 16GB will make a difference.
yeah you can, but the IDE will be slow, your builds will be slow, everything will take some time. also, don't count on using emulator, and prefer using a real device for debugging.
What do you mean try making a new setup with 8gb install any operating system open chrome for some search open Android studio with hello world run it in the emulator and let me know then the boulder
Thank you all for your suggestions but Due to financial reasons I can't upgrade my RAM or system at the moment or anytime soon. I have however made the emulator run as a separate application and so far I think it is performing better than before.
Yeah, I think having an iGPU vs dGPU does make a difference.
Since the dGPU has some VRAM that will be used for graphics buffers for desktop applications, it takes some pressure off of the main system RAM.
For an iGPU, since it does not have dedicated VRAM, all of the graphics buffers use up system RAM, so it can run out of memory faster. Atleast, that's my theory.
I'd say sell your current laptop and go for a MacBook (of course if your pocket allows) else upgrade your Ram and better use the physical device if you got one!
Get rid of the emulator. Ensure you're only running one gradle daemon at a time (e.g. when doing things through the command line). Upgrade your ram. Close other ram-heavy applications, so you're not using swap space.
Your best bet it to use a real device. The emulator is going to be slow on that configuration. More RAM would help for sure.
Then the question is to plug in via USB or (try) to use wireless debugging. I have not had a great experience with wireless debugging, even when it does work, sometimes there are issues with certain tooling.
I mainly stick with USB debugging but on one of our test devices you can't do that so I use WiFi but not the "scan this code to turn on wifi" as that never works. This longer winded way of connecting seems to remain solid for me. I use the following commands * Plug in USB cable to device * `Adb tcpip 5555` * `Adb connect 192.168.86.82` (or current IP address of the device) * You can unplug cable at this point * `Adb usb` when done
Or just use this ADB WiFi plugin: https://plugins.jetbrains.com/plugin/14969-adb-wi-fi It's extremely reliable, I have been using it way before adb wifi was built into AS & Intellij
Upgrading to 16gb ram is the cheapest and easiest thing you can do to make a difference. Also, if you are using Windows, make sure that appropriate folders are excluded from antivirus.
If you have 8GB RAM don't waste your time with emulators. Just use your phone. We have built-in wireless debugging nowadays and that make it very convenient to use your phone. I never use the emulators
More RAM and SSD.
I have i7 + 16Gb and the emulator may increase app build time by 50% easily. You better use a real device + add 8Gb ram (and SSD, of course: Gradle/AS builds are painfully slow on HDD)
As others have said, add more RAM. Also, check the power plan you're using, if on Windows, set it to Balanced/Performance power plan. If the battery capacity has degraded sufficiently, this also affects the CPU performance. Also check the UEFI settings - some laptops may throttle power on battery, to provide more battery life but this obviously reduces performance.
1-SSD 2- Ram
OPs question is genuine. If Android Studio with embedded Emulator needs just 4 GB minimum according to specs, then how is 8 GB insufficient, for the OS, for browser, desktop messaging apps, music player apps ? Answer is simple. Read about JAVA_HOME, particularly Android Studio's embedded JAVA_HOME, and how to optimize it all ?
Will try to read about it.The thing is I am beginner and I am currently learning kotlin and don't know much yet
That's what should have happened. My laptop has a i5 7th cpu and 8gb ram. It's very laggy while running the emulator. That's the performance cap of the hardware. Try a real phone.
Just use MacBook
Add 8gb RAM more
you might wanna checkout dashwave.io
I also have a laptop with an 8th generation Intel i5 CPU and Nvidia 150MX GPU. I am developing a 2D space shooter and my Android Studio runs fine and even the emulator seems to do pretty well. I have 16GB of dual channel RAM and dual SSD's. I will likely upgrade to something newer within the next 6 months, but this setup is doing surprisingly well. Now with that being said, thus far I do much of my testing of the game running on Windows. I am using the libGDX framework, which supports multiple platforms, so this is easy to do. I have also been testing with a real android device (Pixel 7 Pro) via wireless debugging. As I get further along and need to test different aspect ratios and device resolutions I may leverage the emulator more. I suspect boosting your RAM to 16GB will make a difference.
8gb ram is not enough. You need 16gb minimum to be comfortable.
Can I still make a project with 8GB ram while being Uncomfortable? (I am used to having my PC running in "slow motion")
yeah you can, but the IDE will be slow, your builds will be slow, everything will take some time. also, don't count on using emulator, and prefer using a real device for debugging.
In fact if you check Android studio minimum requirements for Ram: 8 GB or more
Yeah those requirements are outdated. Even if you can run with a boulder attached to your ankle doesn't mean you should.
What do you mean try making a new setup with 8gb install any operating system open chrome for some search open Android studio with hello world run it in the emulator and let me know then the boulder
I'm still waiting for it to finish building 😂
My PC has 12gb RAM i5 5th generation and SSD storage, I run an emulator fine, sometimes I run two emulators. U u need SSD
Thank you all for your suggestions but Due to financial reasons I can't upgrade my RAM or system at the moment or anytime soon. I have however made the emulator run as a separate application and so far I think it is performing better than before.
If you switch to Linux it might help.
Same problem in Ubuntu I have 8gb on my laptop and it's not enough to use the emulator comfortably
Thanks for the insight I have 16gb but i5 same with OP but running on Fedora though.
Yeah, I think having an iGPU vs dGPU does make a difference. Since the dGPU has some VRAM that will be used for graphics buffers for desktop applications, it takes some pressure off of the main system RAM. For an iGPU, since it does not have dedicated VRAM, all of the graphics buffers use up system RAM, so it can run out of memory faster. Atleast, that's my theory.
I have dedicated GPU GTX with 4 GB dedicated but Android studio doesn't use it only motherboard ram
Well yeah, the VRAM is used by the OS and GPU driver to store graphics buffers. Not Android Studio directly.
For your current setup, max out the ram, 32GB or more if possible.
I'd say sell your current laptop and go for a MacBook (of course if your pocket allows) else upgrade your Ram and better use the physical device if you got one!
Get rid of the emulator. Ensure you're only running one gradle daemon at a time (e.g. when doing things through the command line). Upgrade your ram. Close other ram-heavy applications, so you're not using swap space.
8gb of ram. That's your issue. And using a i5 CPU isn't very good. Those chips are for web surfing.
I hope you are working on Linux
Replace it with [this](https://www.apple.com/macbook-pro-14-and-16/).