I am working on a project on Android Studio where I am using some libraries. But out of them one library/module is not of any use. Now I want to remove/delete that particular Module. But when I right clicked on that module no delete option shows. I then went to Android Project folder in my C Drive and deleted that module's folder. But still that empty module is showing in android studio. How to remove it totally??
-
1Remove it from build.gradle. – Daud Arfin May 10 '17 at 07:13
8 Answers
Go to File -> Project Structure -> Dependencies -> Select library/module -> click minus(-) -> Confirm selection from alert.
Alternative
If the above solution does not work then try this:
firstly remove the library from your build.gradle file and then delete it from the project structure.

- 1,453
- 17
- 30
Go to File > Project Structure > Select the module in modules and press minus(-) on the top left. This will remove the library but you will have to manually remove the files form your project . this link will help you in better understanding.

- 1
- 1

- 2,142
- 11
- 22
Sometimes the modules won't be showing in the module settings dialog. You have to check the .idea folder and modules.xml file and manually remove the unwanted modules (take caution though).
Hope it helps someone.

- 1,950
- 18
- 28
-
3had a problem where by i deleted the module manually not knowing there were particular steps to follow. Only your answer led me to deleting it properly and not have it show in the ide – Chief May 29 '20 at 23:10
-
1Yes it indeed helped me :). But in my project it was modules.xml not .iml, any idea why? @Monster Brain – beginner Jul 29 '20 at 05:48
open build.gradle
file, remove line which you dont want in your dependencies.
clean and rebuild your project..
if you applying module, open setting.gradle
, remove module from there

- 8,996
- 4
- 27
- 45
Delete the path in build,grade(app) then Go to File > Project Structure > Select the module in modules and press minus(-) on the top left. This will remove the library but you will have to manually remove the files form your project .

- 1,334
- 11
- 15
Just need to remove it from build.gradle(app)
implementation(project(":core:yourLibraryModuleName"))
and then remove it from 'setting.gradle'
include ':core:yourLibraryModuleName'
and finally, go to the project item to show your project files and delete your module and sync your project

- 187
- 3
- 7
just right-click on the module/library, click on Open In, and delete the folder.

- 500
- 1
- 10
Remove liebrary name from include in setting.Gradle from gradle Scripts

- 344
- 1
- 3
- 12