Can someone tell me how to build a module,i.e Only Single Module ? There is only one option to build the whole project,but If in the project there are multiple modules then how to build those separately ?
For example, if you want to run a particular activity, you can right-click the activity Java file and select Run. Depending on the item, Android Studio uses an Android App, Android Instrumented Tests, or Android JUnit default template to create the configuration.
You can use task's fully qualified name to execute a specific task in a specific subproject. For example: gradle :services:webservice:build will run the build task of the webservice subproject. The fully qualified name of a task is simply its project path plus the task name.
A project with multiple Gradle modules is known as a multi-module project.
Select the module you want to build or the build.gradle file itself in the project view. (Other views might also work; I think what's important is that whatever has focus, either in the project view, editor or elsewhere, will be the module available for building.)
Now go to Build in the menu bar. There should be an option to make that individual module directly under the option to make the whole project.
(I have only tested this in versions 1.5 and 2.0).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With