18

I migrated yesterday to Android Studio 5.x from Eclipse. It's nice.

However when I run the app to compile and install it into my phone it takes more time than eclipse.

I click run, and it starts making the app. The tasks say: Grandle: Executing tasks [:mypackage:assembleDebug]. Upon completion is says Grandle invocation completed successfully in x min x sec. Then it loads it.

The problem is that it sometimes might take just 20seconds but other times 2-3 minutes. Which is annoying waiting time. Is this execution necessary to have it always run before each compiling? Can I close it or reduce its time?

I'm sorry if this question is not accurate but I'm not familiar how grandle fully works in AS.

Diolor
  • 13,181
  • 30
  • 111
  • 179
  • 1
    It's required. The difference in time is that it'll be only what's necessary so depending on what files you add/change, it can do only a little or a lot. We do intend to improve build speed where possible, but you cannot stop building before deploying or you risk not deploying your current project state. – Xavier Ducrohet Mar 31 '14 at 03:55
  • Are you still facing this issue in 0.6.8? try updating your IDE – hoomi Aug 23 '14 at 10:17

3 Answers3

4

You can speed up gradle a little more by using this configuration in main gradle.properties (in Windows you can find this file in C:\Users\YourUserName\.gradle\ or /Users/YourUserName/.gradle/ on Mac - or create new one If does not exist):

org.gradle.daemon=true
org.gradle.parallel=true

This is all you can do for now, Google said on IO that they will try make It faster.

There is also similiar topic: Android studio Gradle build speed up

Community
  • 1
  • 1
Yuraj
  • 3,185
  • 1
  • 23
  • 42
0

If your operating system is Windows, gradle build will really take a lot of time. Try to use Ubuntu. You can try to dual boot Ubuntu alongside windows. I installed Ubuntu alongside my windows 8.1 laptop and then installed android studio. Its not very easy at first, there are many steps, many things to install. It took some research to make the installation work. But in the end it is rewarding. Before I'm doing a gradle build in Windows in 3-5 mins now its just 3-8 seconds.

jrarama
  • 904
  • 7
  • 8
0

If you are on Windows, do all that you read on this page, and also try to disable your antivirus for 1 hour to note if there is any difference. I am on Avast and disabling it while building scrapes a few seconds.

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
Wale
  • 1,321
  • 16
  • 11