AliSmart AliSmart - 1 year ago 136
Android Question

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.

Answer Source

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%

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download