Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio Build only 1 Module

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 ?

like image 552
Chiradeep Avatar asked Dec 30 '14 07:12

Chiradeep


People also ask

How do I run a specific module in Android Studio?

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.

How do I run a specific module in Gradle?

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.

What is multi module in Android?

A project with multiple Gradle modules is known as a multi-module project.


1 Answers

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).

like image 199
nimble_ninja Avatar answered Sep 29 '22 21:09

nimble_ninja