Android Studio需要很长时间才能在真实设备上运行应用程序 [英] Android Studio Takes too long time to run the app on real device

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

问题描述

我有一台配备酷睿i3处理器和2GB内存的笔记本电脑,并且使用我的索尼Xperia C作为模拟器的替代产品。
当我点击调试并选择我的移动设备时,Gradle开始构建,完成大约需要5到10分钟。
我知道我的资源非常少,但我怀疑为什么完成构建和运行应用程序需要很长时间还有另一个原因。



我在logcat标签中发现它正在花费时间发送请求并反复等待响应。



任何人都可以告诉我问题是否与硬件资源有关或者我的怀疑是真实的,原因是别的。

解决方案

Android Studio非常耗资源。我使用了带有Core 2 Duo和2.5 GB RAM的老式索尼,并且为操作系统运行了大约200MB的调整系统。建立一个项目需要大约10分钟或更长的时间。



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



- 更新 -



Windows 10的默认设置将使用大约90%以上的磁盘,这将使您的构建过程变得更慢。您可以通过关闭Show Me About Windows将其降低至<12%:


在Windows菜单中,转到设置,然后进入系统,然后去
通知和操作。关闭Show Me Tips About Windows

forum / id-2813275 / disk-usage-100.htmlrel =nofollow>磁盘使用率始终为100%


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.

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

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.

-- UPDATE --

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

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"

update reference: Disk usage always at 100%

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

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