Rebuild, Sync Gradle and Clean for just one Module

2019-06-16 03:19发布

I have in Android Studio a complex project establish by five modules. Four of them act as independent apps, but one of them is the base code for the rest. This way, I can have a big common core and four separates codes for every app (these apps share the shame model data and api connection).

My question is if it is possible rebuilding, cleaning or syncing just for one module, non the entire project in Android Studio.

Thanks!

3条回答
兄弟一词,经得起流年.
2楼-- · 2019-06-16 04:18

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

enter image description here

查看更多
神经病院院长
3楼-- · 2019-06-16 04:22

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.

查看更多
Rolldiameter
4楼-- · 2019-06-16 04:25

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

查看更多
登录 后发表回答