I've been using Android Studio for a few months without any hiccups but now it keeps using too much computer resources resulting to system crash and sometimes blue screen of death. The usage of CPU and RAM goes up to 100% when gradle is running and crashes every time I try to use emulator. When I type the code the program works fine. My Android Studio version is 2.2 right now. Any solution?
Related
I am testing a flutter app in the emulator in Android Studio. The app and emulator had no issues a few days ago. Suddenly, the app is painfully slow in a couple of areas:
The emulator no longer auto-boots the app. After Installing build/app/outputs/flutter-apk/app.apk..., nothing happens. But the app is installed, and if the app is run manually, the debugger starts logging.
On initial load where the user logs in to firebase auth, or when already logged in and the app goes through that verification. This takes about 5-10 minutes on an emulator, and about two seconds on a physical device (and was previously this fast on the emulator).
Occasionally firestore realtime updates don't happen, but are usually very slow
A few troubleshooting notes:
Emulator itself does not appear slow (i.e. no visible lag, and loading spinner is regular speed)
I have fully uninstalled Android Studio and reinstalled.
System has 8 core CPU, 64GB RAM, modern GPU, SSD
Emulator device is allocated 8GB RAM, 512MB heap, 3GB local storage
Android studio and plugins are latest version
Emulator network speed is set to full
This issue occurs on Windows. It runs normally on Mac Android Studio Emulator
This issue appears to be fixed with the latest stable Android Emulator release, v31.3.11-9058569.
It's the issue with the recent versions of Android Emulator on Windows platform. Downgrade the version of Android Emulator to 31.2.9.
You can download it from here.
Procedure of manual installation of custom version of Android Emulator is given in the link above.
Edit: This issue is fixed in latest version(31.3.x) of Android Emulator.
About a month ago I upgraded to Android Studio 2.0 after being on 1.5 for quite a while. I have a suite of 23 tests built on top of Espresso that drive my app.
Normally, I use Genymotion Pro but I have been trying to get a CI server going and I wanted to use the "new and improved" Google Android Emulators.
Today I finally got around to trying the new emulators. I was pleasantly surprised after installing my app and playing with it.
My optimism quickly faded when I went to run my tests via Android Studio. Here are some of the problems I encountered:
The test took a ridiculous amount of time to install and sometimes hung for over 5 minutes at which point I would close them.
The emulator restarts itself between every test. This adds a considerable amount of time to total execution. Sometimes when restarting it just freezes up and I have to close it.
Tests failing randomly for no reason.
After a test finishes running sometimes the emulator just hangs on a black screen for a long time. Sometimes for so long I just kill the emulator.
After the tests do finish the emulator is often unresponsive and broken.
Note that none of the above ever happens with Genymotion.
Some additional info:
My machine is a MacBook Air running Yosemite (10.10.5)
My app uses the newest versions of all SDK dependencies right now.
Animations are turned off on the Emulators
I am compiling with Java 1.8 and using RetroLambda (I don't see why this would matter but who knows)
I am pretty confident that my Espresso tests ran smoothly on the pre-2.0 Emulators, but it has been at least a month since I would have done that and I can't say for sure. I will probably downgrade and try it out if nothing else works.
Log cat hasn't provided me with any useful info when all of this is happening.
Tests work fine on real devices connected via USB.
Things I have tried:
I thought it was possible that this was an issue with Android Studio. Alas, with Gradle on the command line the same issues occur.
I have tried a bunch of different variations of device type and ABI version, the problem occurs on all of them.
I downloaded a few Espresso sample projects from Github. I experienced the same issue with all these projects, indicating that this probably isn't an issue with my particular Espresso setup.
Deleting old emulators and making new ones.
Coworkers have replicated the issue across machines (all macs of various kinds)
I am perplexed by this. Is anyone else experiencing the same thing? Is there anyway I can get the Google Android Emulators to run tests in a useful way?
Thanks!
I had install android studio 1.0 in two days ago, but when I want run a emulator, I should wait for run more than 10 minutes.(my system is Asus N53sv and my emulator is google_Nexus_API 17 x86).
Now what do am I?
Emulators are slow.
They're bootstrapping the entire mobile device and its components, and you'd require a machine with decent hardware to run one quickly.
Emulators are memory intensive. Android Studio happens to be as well, and if this is your machine, then it's not going to load very fast at all. I'm surprised that it's loading at all!
There's not much you could do outside of upgrading your machine, though.
My Android emulator beachballs on startup almost every time I try to use it. I'm currently using Android Studio 0.2.0 build 130.737825 on OSX 10.8.4. It seems like it will launch into Android once or twice, then if I close and reopen, it hangs on the black screen before the Android splash screen. At this very moment, it's been hung for about 15 minutes. I don't see anything useful happening in Console. And Android Studio is fine. It's just the emulator that hangs.
The android emulator is pretty much unusably slow. I recommend using genymotion instead of the emulator. Genymotion runs the android device as a virtual machine, so it's basically like having a real device running. And it's super fast.
Android's emulator is slower than Apple's simulator. you can refer to here to know why. But you can actually enhance the virtual device(x86 not ARM) performance, if you install Intel x86 Emulator Accelerator(HAXM) which can be found in Android SDK Manager.
I am trying to test a simple status bar notification program on Android 3.0 emulator.
When I try to run my application from eclipse, sometimes either I see a message that apk can't be installed when I check the DDMS log, I see java outOfMemory error. Though my application is fairly simple just one java file.
Sometimes when I launches my emulator it shut down my windows completely. I tested this on Windows XP and Ubuntu as well. In Ubuntu too when emulator was about to launch completely and showing home page my OS crashes.
Any other version of Android works well on my PC like 2.2, 2.3. I see this issue only with 3.0 (honecomb) version. Any resolution to this?
Thanks
Manish
Well when making an AVD from the AVD Manager , assign it maybe 200 -500 mb and this issue will be resolved.
I have noticed the resource usage while running 3.0 is much more than 2.3 and below. The error you are getting refers to the emulator/eclipse needing more memory not your application. How much memory and CPU do you have?