0

I'm currently working on a project and it take up to 1 min for Android Studio to build it. Yesterday I was working without Internet connection and it turned out that it needed only 30s for AS to buid the project. What is the reason? Does it mean that the building process check something online each time it builds? Is there any way to change that?

My project has 2 submodules and I would avoid them to be built each time I build the project as nothing as changed. Is there a way to do that?

2
  • i think, the submodules are not completely rebuilt when nothing changed. gradle usually shows the info "UP-TO-DATE" when some steps are not needed and skips them. so the submodules only slow down the build process because gradle needs to scan the modules but it should not recompile / rebuild unchanged code.
    – dedda1994
    Aug 11, 2017 at 9:29
  • 1
    My project has 2 submodules and I would avoid them to be built each time I build the project as nothing as changed. Is there a way to do that? - For this,you could use Instant run. It allows you to push code changes without building a new apk each time.
    – Anurag
    Aug 11, 2017 at 9:43

1 Answer 1

0

Best way to speed up ,is to use instant run feature and make sure you have Android Studio 2.3 and higher to support this feature.

Follow this link to you instant run

https://developer.android.com/studio/run/index.html

3
  • do comment if you are already using instant run,So that i can suggest you other ways also. Aug 11, 2017 at 9:50
  • I don't at the moment as I don't find it reliable especially when changes affect xml resources only. But I can give it a try (again) and see what happen. But still it doesn't explain why my building time is divided per 2 when I'm offline.
    – Eselfar
    Aug 11, 2017 at 10:04
  • i just tried multiple projects in my system both online and offline. it doesn't effect build times. Aug 11, 2017 at 10:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.