Android Studio 在真机上运行应用需要很长时间 [英] Android Studio Takes too long time to run the app on real device

查看:49
本文介绍了Android Studio 在真机上运行应用需要很长时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台配备 Core i3 处理器和 2GB RAM 的笔记本电脑,我使用 Sony Xperia C 作为模拟器的替代品.当我点击调试并选择我的移动设备时,Gradle 开始构建,大约需要 5 到 10 分钟才能完成.我知道我的资源非常少,但我怀疑是否还有另一个原因导致构建和运行应用程序需要很长时间.

I have a Laptop with a Core i3 processor and a 2GB of RAM, and I am using my Sony Xperia C as an alternative to the Emulator. When I click on debug and choose my mobile device, the Gradle starts building and it takes about 5 to 10 minutes to finish. I understand that I have very low resources but I doubt that there is another reason why it takes too long time to finish building and running the app.

我在 logcat 选项卡中注意到它花费时间发送请求并重复等待响应..

I noticed in the logcat tab that it is spending the time on sending a request and waiting for a response repeatedly..

谁能告诉我问题是出在硬件资源上,还是我怀疑是其他原因造成的.

Can anyone tell me if the problem is with the hardware resources or my doubts are true about the cause being something else.

推荐答案

Android Studio 非常需要资源.我使用带有 Core 2 Duo 和 2.5 GB RAM 的旧索尼,经过调整的系统运行大约 200MB 的操作系统.构建一个项目大约需要 10 分钟或更长时间.

Android Studio is very resource hungry. I use an old Sony with Core 2 Duo and 2.5 GB of RAM, with tweaked system that running about 200MB for the operating system. It takes about 10 minutes or more to build a project.

我的建议是,将您的笔记本电脑 RAM 升级到 4GB 或更多.8GB应该够了.现在我正在使用 4GB 和 Corei5,其中 Android Studio 大约需要 <运行一个项目需要 1 分钟,但这取决于项目大小及其依赖项.

My suggestion, upgrade your Laptop RAM to 4GB or more. 8GB should be enough. Now I'm working with 4GB and Corei5 where Android Studio take about < 1 minutes to run a project, but it depends of the project size and its dependencies.

-- 更新 --

Windows 10 的默认设置将使用大约 >90% 的磁盘,这将使您的构建过程更慢.您只需关闭Show Me About Windows"即可将其降低到 <12%:

Default setting of Windows 10 will use about >90% of your disk which will make your building process much more slower. You could decrease it to <12% by simply turning off "Show Me About Windows":

从 Windows 菜单,转到设置,然后转到系统,然后转到到通知和操作.关闭显示有关 Windows 的提示"

From the Windows Menu, go to Settings, then go to System and then go to Notifications and Actions. Turn off "Show Me Tips About Windows"

更新参考:磁盘使用率始终为 100%

这篇关于Android Studio 在真机上运行应用需要很长时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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