5

i'm using android studio as IDE for my application developpement and i'm not sure about the fact that when i remove a dependency from my dependencies list in gradle all the related file are going to be remover or i have to remove all of them manually

did any one can help Thanks

1 Answers1

5

You can go to File -> Project Structure -> Modules -> Dependencies and remove any dependency graphically, or you can just remove it form build.gradle file.

If you project is using the dependency, you are currently removing, you will have to update that and remove any references to the dependency before building.

mallaudin
  • 4,744
  • 3
  • 36
  • 68
  • 1
    You can't do it graphically, because there is no remove button – only an add button. Editing the build.gradle file works though. – Philipp Ludwig Mar 01 '22 at 17:23
  • 1
    I see a lot of dependencies in my project (project structure -> dependencies -> all modules) which are not added via build.gradle (module). How can I verify that these are not used somewhere and how to delete them? In .idea\libraries I see the relevant xml file but don't find any sources or binaries which are listed there. No mention of the libraries in the source code is found. Is it safe to just delete the xml files in the .idea\libraries folder? – tuxdost May 06 '22 at 10:45