Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
813 views
in Technique[技术] by (71.8m points)

performance - Android Studio Takes too long time to run the app on real device

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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%


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...