Issue
When I run the Android Studio AVD that comes with the IDE, the device is a bit slow and when closing the device (with the close icon) the mouse stops moving and the screen starts to flicker (by blinking I mean the Android Studio IDE disappearing at random intervals), then stops like after two minutes and then the virtual device shuts down.
I have proved with three devices at API 25: Nexus 5 -Nexus 5x -Nexus 4
With Nexus 4 the app is faster, but is the same problem when closing it, it freezes my PC.
I do not the causes and makes working with android studio slow and annoying.
Today when closing the emulator, it freezes like two minutes and Windows 10 gave me a blue screen with the error: Driver Power State Failure.
Any solutions?
My computer specs:
- Windows 10
- Intel core 7
- 8 ram Gb
- 64 bits
Solution
If your android studio gets hang multiple times then you can try this below step : -> Go to help in Android Studio -> click on Edit custom VM Options then Paste Below Text :-
-server
-Xms2G
-Xmx4G
-XX:MaxPermSize=2G
-XX:ReservedCodeCacheSize=1G
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=100
-Djna.debug_load=true
-Djna.debug_load.jna=true
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+HeapDumpOnOutOfMemoryError
After that restart your android studio and check bottom right side , One indicator is visible for memory usage. If you see that indicator shows more memory , than just click on that indicator its release unused memory from android studio and process will work smoothly.
After follow this step android studio will work smoothly.
Answered By - Jaimil Patel
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.