简体   繁体   中英

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

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!

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

在此处输入图片说明

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

More details in the docs .

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"

在此处输入图片说明

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

在此处输入图片说明

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM