Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to delete a module in Android Studio

Is there a way to delete a module within Android Studio? When I right click on a module I can't find an option for deletion, is it elsewhere?

like image 445
Stephan Avatar asked May 23 '13 09:05

Stephan


People also ask

How do I remove a module from an Android app?

Step 1: First, go to the project section on the left-hand side of the Android studio. Step 2: Right-click on the project whose module you want to delete and go to the option of Load/Unload modules. Click on the module which you want to delete and click on unload button.

Where are modules Android Studio?

Click File > New > New Module. In the Create New Module window that appears, Android Studio offers the following device modules: Phone & Tablet Module.


2 Answers

The "Mark as Excluded" option isn't there anymore.

The current (Android Studio 0.8.x - 2.2.x) way to do this is via the Project Structure dialog. It can be accessed via "File -> Project Structure" or by right-clicking on a Module and selecting "Module Settings".

enter image description here

Then select the module, and click the "minus" button to remove it.

enter image description here

The directory will still be visible in the "Project" view (though not in the "Android" view) since it's not actually deleted, but it will no longer be treated as a module.

If you want, you can then physically delete the files it by right-clicking on it and pressing "Delete".

like image 196
matiash Avatar answered Nov 06 '22 04:11

matiash


(Editor's Note: This answer was correct in May 2013 for Android Studio v0.1, but is no longer accurate as of July 2014, since the mentioned menu option does not exist anymore -- see this answer for up-to-date alternative).

First you will have to mark it as excluded. Then on right click you will be able to delete the project.

Step 1

Step 2

like image 30
Sandeep Avatar answered Nov 06 '22 05:11

Sandeep