Gradle build is very slow after adding Android Design Support Library

Android studio is very slow after adding Android Design support library to gradle

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

but it quickly recovers as soon as I delete the above library, 30 seconds versus 5 minutes, I use TabLayout and the toolbar from the library, so I need it, I'm not sure if the problem is with the library or TabLayout itself takes time to load, / p>

Is there any way to speed up the build process by any means?

Update: . The actual reason was the company’s firewall, although a proxy server is installed it takes a long time to check each incoming file and cause a huge delay, so the accepted answer should work to avoid frequent calls

+4
source share
1 answer

After gradle sync, you can enable standalone gradle sync in Android settings.

To do this, open the Android Studio settings and open

Assembly, Execution, Deployment> Assembly Tool> Gradle

and check the box "Offline work" in the global gradle settings.

Now gradle will get the project dependencies on the local cache

+6
source

Source: https://habr.com/ru/post/1608463/


All Articles