Rebuild, Sync Gradle and Clean for just one Module with Android Studio

For the addition the all of answer you can type a specific gradle task instead:

https://www.jetbrains.com/help/idea/work-with-gradle-tasks.html#gradle_tool_bar

enter image description here

In my case, Press ^ (macOS) twice -> Type gradle :your-specific-dfm:build


I face the same problem,search for Google,No answer direct question.

I find Android Studio Menu,find the method .

Run - > Clean and Rerun"modle name"

enter image description here


Nowadays with Android Studio you can use build -> make module “nameModule”

enter image description here


sure, just use the project name when running Gradle, e.g. gradlew :api:build. This will build api module only.

More details in the docs.