How To Automatically reload a Gradle project

By default, regardless of the IDE that you are using (Android Studio, IntelliJ IDEA or Eclipse), the reload of a Gradle project must be explicitly triggered by the user when the configuration of the project has changed. This allows to avoid reloading the project too frequently, but the user must not forget to manually reload the project to apply changes.

It is also possible to configure your IDE to automatically reload your Gradle project:

The auto-reload of a Gradle project with Android Studio / IntelliJ IDEA can be enabled as follows:

  • Click on File > Settings….

  • Go to Build, Execution, Deployment > Build Tools.

  • Check the Reload changes in the build scripts option and check the Any changes option.

auto-reload option in Android Studio / IntelliJ IDEA

Auto-reload option in Android Studio / IntelliJ IDEA

  • Go to Languages & Frameworks > Kotlin > Kotlin Scripting.

  • Check all the Auto Reload options.

auto-reload Kotlin option in Android Studio / IntelliJ IDEA

Auto-reload Kotlin option in Android Studio / IntelliJ IDEA