arrow_upward

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Do you know the solution for slow AVD in Android Studio?
#1
Hi, 
I am developing an android app using android studio. I have tried different devices in AVD manager but all of the emulators are very slow and I could not even test  my app on it. So I mostly build apk and transferred to my phone for testing.
Currently I have made some mistake and the app seems closing while I open the app. I could not use logcat due to the AVD issue. What can I do? 
I could not find the mistake.


Thank you  Sweet



#2
The main reason for a slow experience in Android emulator is lack of computing power and resources. What is your hardware setup? Do you have hardware virtualization on your CPU enabled? Are you running the emulator of a HDD or SSD? If you are running it of a HDD is it running from the same HDD from which your OS is running and everything else?

On my old computer I have a Intel Core i5-6500 with 16 GB RAM and a SSD only setup with two SSDs. I used Bluestacks and the Android emulator itself was running absolutely fine performance wise because I had it a) on the second SSD seperated from the SSD where the OS was running and b) I have enough resources and power plus c) I have hardware virtualization enabled in the CPU settings of my BIOS/EFI/UEFI. However Despite having so much power the experience wasn't 100% smooth. Games were rather bad for example because I only had the Intel HD 530 of the Intel CPU and no dedicated graphics card. Some other more heavy apps also had some kind of issues where it would lag the system and crash sometimes.

Android emulators are still not perfect but they do benefit a lot from a powerful machine. Also running things from the same HDD or SSD where your OS is and from where other programs are running is rather bad. Especially with HDDs the performance is horrible.
[Image: zHHqO5Q.png]
#3
what did you try so far to capture the log / stack trace ?

you say you are using your own mobile to debug and test your app. why not use 'adb logcat' then ??

there are apps in appstore that can do the job for you. for that you will need root or some command from adb.

oh, don't forget to enable usb debugging in developer options before you run logcat.

also as we HR said, it depends on your hardware setup. but i think for a simple enough app, even a computer with basic requirements met, will do just fine.
Sincere Thanks to VirMach for my VPS9. Also many thanks to Shadow Hosting and cubedata for the experiences I had with their VPSs.
#4
(03-27-2020, 05:15 PM)Hidden Refuge Wrote: What is your hardware setup? Do you have hardware virtualization on your CPU enabled? Are you running the emulator of a HDD or SSD? If you are running it of a HDD is it running from the same HDD from which your OS is running and everything else?

Intel® Core™ i5-3320M CPU @ 2.60GHz
4 GB RAM
64 Bit OS, x64 processor
I have enabled virtualization. The storage is HDD. I am using only single HDD.
(03-27-2020, 05:28 PM)rudra Wrote: what did you try so far to capture the log / stack trace ?
you say you are using your own mobile to debug and test your app. why not use 'adb logcat' then ??
oh, don't forget to enable usb debugging in developer options before you run logcat.
Thank you for remembering me about developer options using our android device. I was just sending the file using bluetooth and was installing it on my phone. Yesterday after watching your comment I tried to connect the device using USB debugging. I was able to see my phone in test device and logcat worked finally. I was able to solve the issue with the app last night.


Thank you  Sweet



#5
@Littlemaster

You have just answered your own question by providing me your specifications.

No offense but this mobile setup you have is not meant for running any Android emulator (at least not in a usable state). The while being old might be not the problem at first. RAM is a big issues. You have your actual OS running and other applications. You want to cram a whole Android emulator into the small free RAM you have? Nope. Not with todays Android versions and stuff. 4 GB is just not enough. And furthermore as I explained you are indeed running everything off the same HDD. And I guess that thing is a 5400 RPM HDD as it mostly is with notebooks. These are insanely slow with the OS and a few applications running on it already but when you add another virtualized OS running on it... the overall I/O is/will be horrible. All of this accounts for your horrible experience with the Android emulator.

Great to hear you found a way to fix the issues Smile .
[Image: zHHqO5Q.png]
#6
You probably do not even need to use adb via USB debugging for this purpose.

You could simply add a few codes in your own app to catch the exit error and then write logs to a custom folder.

By the way your 4 GB RAM is absolutely not enough for running AVD smoothly anyway. Smile


#7
it is nice to hear that you found your solution. I wanted to tell you that if you want to keep using this system for a while now, then try to find at least another 4gb ddr3 from used market. buy it after testing or buy corsair or some other with warranty. they will soon become less available and as a result there price will again increase.

8+8 will be a nice thing for your system. if you are just doing small / medium projects and no multitasking, then 5400 rpm hdd might be just ok. otherwise, invest in a second hand samsung evo ssd. check it before you buy and make sure it has warranty left and have enough write left.
Sincere Thanks to VirMach for my VPS9. Also many thanks to Shadow Hosting and cubedata for the experiences I had with their VPSs.


Possibly Related Threads…
Thread
Author
Replies
Views
Last Post
3,311
03-25-2019, 06:02 PM
Last Post: xdude
1,810
11-27-2018, 02:40 PM
Last Post: rudra

person_pin_circle Users browsing this thread: 1 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting