How to delete Library/Module in Android Studio?

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.


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.