Android Studio 1.0 build too slow

android, android-studio, gradle

Solution

I ended up building the first time online, and after that switching to offline mode

That lowered the time to ~14 secs.

My guess is that gradle is trying to resolve dependencies online ignoring my "mavenLocal()" (and all its variants)

Problem

I've updated Android Studio to 1.0 RC (both 1 and 2) from 0.9x and my project build time passed from 20 sec to around 90 sec. Anyone is having the same problem? UPDATE Running the same task on terminal, I see that the "Resolving dependencies" step is taking most of the extra time. UPDATE 2 Thanks to @bond, I've noticed that going offline lowers the build time to about 30 sec, so I tried to use mavenLocal() on the build.gradle, but no luck there either. Top Level build.gradle: ``` // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { mavenLocal() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.0.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { mavenLocal() jcenter() } } ```

Original source

Related problems