2

I deleted a jar from my libs file and now I cannot build the project and the jar will not go away.

I've tried cleaning the project, fixing the android properties now I'm stuck.

Has anyone else had this problem?

Description Resource    Path    Location    Type
Archive for required library: 'C:/apps/APP/libs/imagecrop.jar' in project 'APP' cannot be read or is not a valid ZIP file   APP     Build path  Build Path Problem
Oliver Dixon
  • 7,012
  • 5
  • 61
  • 95

2 Answers2

9

Solution.

Don't use clean or "fix project properties"

Simply right click on the project and press "Refresh"..

Oliver Dixon
  • 7,012
  • 5
  • 61
  • 95
  • 1
    WOW that simple fix my problem after i delete the jar in libs folder +1 – Javier Jun 13 '13 at 17:21
  • My case was similar, but my project uses Gradle. My resolution required that I right-click my project and select Gradle > Refresh Gradle Project in Eclipse. – James T Snell Jul 12 '17 at 01:13
4

You need to remove it from your build path. Right click your project, go to Properties->Build Path. The build path contains four tabs:

The Java Build Path properties page contains four tabs:

  • Source. The source and output folders. If you initially create a project without separate source and output folders, you can change it here. Multiple source folders can be used in one project; e.g., to separate application source code from unit tests.

  • Projects. Check-off other projects in the workspace whose output folders should be added to this build path.

  • Libraries. Location of other archive files required by this project.

  • Order and Export. Order in which projects and libraries appear in the build path and the default runtime classpath; e.g., use classes from a workspace project before using the same classes from an archive library.

Go to libraries tab and remove the jar file you deleted.

Also refresh your project by right click -> Refresh so it will realize you deleted jar file.

Erol
  • 6,478
  • 5
  • 41
  • 55