How to delete a module in Android Studio

Stephan picture Stephan · May 23, 2013 · Viewed 243k times · Source

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?

Answer

matiash picture matiash · Jul 6, 2014

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