1

I am using android studio and my builds are taking 3-4 minutes every time. Is there a way to what is taking too long?

Thanks.

J dodo
  • 11
  • 4
  • i think there are parameters you can add to the gradle command, using the studio. like `-info` and `-debug`, this will show detailed log, maybe it can help – Yazan Feb 08 '16 at 09:01
  • I have experienced aggravating gradle performance problems and for me it turned out to be gradle/Android Studio taking a long time to download software update files from the internet. I found this problem by running "Wireshark" in the background and watching HTTP traffic going to URLs that were clearly relating to gradle's build process. So that might be something you could try. –  Feb 08 '16 at 09:03
  • I just change 1 line of code, click run button and wait 3-4 minutes each time. I build with run button, no command line, so how do i see -info now? – J dodo Feb 08 '16 at 09:22

1 Answers1

0

There are many reason for this issue,

Please check Gradle taking long time for more detail.

Some of reasons are

  • Dependencies
  • Code stucture
Community
  • 1
  • 1
Amit Vaghela
  • 22,772
  • 22
  • 86
  • 142
  • I am using google cloud messaging api, but is it normal time for a build ? – J dodo Feb 08 '16 at 09:21
  • Yes, it is normal to that it is taking time to build for first time but while on next time it should take less time than first one. take several steps that are described in my answer link and it will decrease time to build such as code optimization @Jdodo – Amit Vaghela Feb 08 '16 at 09:26
  • check this link to reduce build time http://kevinpelgrims.com/blog/2015/06/11/speeding-up-your-gradle-builds/ @Jdodo – Amit Vaghela Feb 08 '16 at 09:39
  • I understand it should take long first time, however that is not the case here. I build it in 4 minutes run it, then change 1 line of code, and still wait 4 minutes. – J dodo Feb 08 '16 at 09:39
  • that are many reasons for that some of them described in answer and update your studio to latest will also make some difference – Amit Vaghela Feb 08 '16 at 09:43
  • did you get your or still in confusion @Jdodo – Amit Vaghela Feb 08 '16 at 10:28