我可以在运行时缓慢使用Android Studio虚拟设备并在关闭时冻结计算机吗? [英] What can i do with Android Studio Virtual Device slow when running and freezing computer when closing?

查看:148
本文介绍了我可以在运行时缓慢使用Android Studio虚拟设备并在关闭时冻结计算机吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行IDE附带的Android Studio AVD时,设备有点慢,当关闭设备(带有关闭图标)时,鼠标停止移动,并且屏幕开始闪烁(通过闪烁表示我是Adnroid Studio IDE会以随机间隔消失),然后在两分钟后停止运行,然后关闭虚拟设备.

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 Adnroid Studio IDE dissappearing at random intervals), then stops like after two minutes and then the virtual device shuts down.

我在api 25中用三种设备证明了这一点: Nexus 5 -Nexus 5x -Nexus 4

I have proved with three devices at api 25: Nexus 5 -Nexus 5x -Nexus 4

使用Nexus 4,该应用程序运行速度更快,但在关闭该应用程序时遇到了同样的问题,它冻结了我的电脑. 我没有原因,使使用android studio的工作缓慢而令人讨厌. 今天,当关闭仿真器时,它冻结了大约两分钟,而Windows 10给了我一个蓝屏,并显示了错误:驱动器电源状态故障.

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.

有解决方案吗?

我的计算机规格: -Windows 10 -英特尔酷睿7 -8兆Gb -64位

My computer specs: -Windows 10 -Intel core 7 -8 ram Gb -64 bits

推荐答案

如果您的android studio多次挂起,则可以尝试以下操作: ->转到Android Studio中的帮助->单击编辑自定义VM选项",然后单击粘贴在文本下方":-

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 :-

-服务器
-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

-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

之后,重新启动android studio并检查右下角,可以看到一个指示符以指示内存使用情况.如果您看到指示器显示更多的内存,而不是仅单击该指示器,它会从android studio中释放未使用的存储器,并且进程将正常运行.

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.

执行此步骤后,android studio将正常运行.

After follow this step android studio will work smoothly.

这篇关于我可以在运行时缓慢使用Android Studio虚拟设备并在关闭时冻结计算机吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆