Ujju
Ujju

Reputation: 2753

Gradle build is very slow after adding Android Design Support library

Android studio is building very slowly after adding Android Design Support library in gradle

compile 'com.android.support:design:22.2.0'

but builds fast once I remove the above library, 30 seconds against 5 minutes, I am using TabLayout and Toolbar from the library hence I need it, not sure if its the library issue or the TabLayout itself taking time to load,

Is there a way I can speed up the build process by any means ?

Update: The actual reason was the company firewall, though proxy is set it takes lot of time to validate each incoming file and cause huge delay,so accepted answer should work to avoid frequent calls

Upvotes: 4

Views: 578

Answers (1)

markView
markView

Reputation: 333

After you synchronize gradle you can enable offline Gradle synchronization in Android Settings.

To do that open the Android Studio Settings and then open

Build, Execution, Deployment > Build Tool > Gradle

and check Offline work checkbox in Global Gradle settings.

Now gradle will gets project dependecies from local cache

Upvotes: 6

Related Questions