How to completely remove an external library in a project?

I would like to completely remove all links to an external library in my project. How can i do this?

What I've done:

  • Right-click on the project folder => Properties => Android => delete the library in the right pane
  • Right-click the project folder => Build path => Configure build paths => In the right pane: you can place the folder relative to the library; I manage to delete one of the resources in this extended fodler, but not the others (and therefore not the root folder)

The library (.jar) is still displayed in my project above the resource folder, and I cannot delete it. Below is what it looks like (cannot be removed by right-clicking and deleting (gray)):

jar file which cannot be removed

Any help would be appreciated!

+6
source share
5 answers

Maybe you need to go:

right click on your project:

Properties> select "Android"

In the "Library" section, delete the desired library.

Perhaps some libraries include other libraries, so you cannot remove them from where you tried.

+5
source

Right click on jar file -> Build Path -> Remove from Build Path

+4
source

Open settings.gradle and delete: "include": librayname '". Then delete the lib file from Myproject / app.

+2
source

I managed to remove the external library after the following steps:

  • Delete compilation record from build.gradle (app)
  • RESTART Android Studio.
0
source

The following steps worked for me: 1. Right-click the JAR file in the libs folder 2. Select the Refractor option and then select the Safe Delete option 3. Delete this entry from build.gradle → compilation files ('libs /) 4. Open the Android terminal Studio and run this command -> gradlew clean

The jar file will be deleted, but the code you used from the jar file will still be in the java files. you can manually delete this.

0
source

Source: https://habr.com/ru/post/900267/


All Articles