Gradle :assembleDebug takes some time before loading the app

11,366

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

Share:
11,366

Related videos on Youtube

Diolor
Author by

Diolor

Autodidact programmer by passion. Among others I work with: Kotlin, RxJava, Android Currently working at car2go.

Updated on June 04, 2022

Comments

  • Diolor
    Diolor about 2 years

    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.

    • Xavier Ducrohet
      Xavier Ducrohet about 10 years
      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.
  • Yuraj
    Yuraj almost 10 years
    Create file gradle.properties if does not exists in that folder.