错误:无法读取所需库的存档或不是有效的 ZIP 文件. [英] Error: Archive for required library cannot be read or is not a valid ZIP file.

查看:38
本文介绍了错误:无法读取所需库的存档或不是有效的 ZIP 文件.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在设置 java 项目的构建路径时遇到问题.我目前在 Co-Op IT 职位,所以我对这一切都有些陌生.我的背景主要是 C++,我正在即时学习 Java.我对 Eclipse(Kepler 服务版本 1)也有些陌生.

I am having trouble setting up the build path of my java project. I am currently in a Co-Op IT position so I am somewhat new to all this. My background is mostly in C++ and I am learning java on the fly. I am also somewhat new to Eclipse (Kepler service release 1).

我正在处理现有程序的错误,需要构建该程序,以便我可以处理它.当我添加所有我知道的外部 .jar 文件是正确的文件时,我在其中两个文件上收到此错误:

I am working on a bug on an existing program and need to get the program to build so I can work on it. When I add all of the external .jar files that I know for a fact are the right ones, I am getting this error on two of them :

所需库的存档:'(文件位置)'无法读取或不是有效的 ZIP 文件"

"Archive for required library: '(location of file)' cannot be read or is not a valid ZIP file"

我团队中的另外两个全职人员已经让程序使用完全相同的 .jar 文件运行,一个运行 Eclipse Indigo,另一个运行与我相同的 Kepler 版本.我还能够手动打开两个 .jar 文件,一切似乎都在那里.在每次尝试解决此问题后,我都刷新、清理并重新启动了 eclipse.另外两个全职人员说他们从未见过这个错误.我想从有类似经历的任何人那里获得一些见解,这样我就不必占用他们更多的时间.

Two of the other full time guys on my team have gotten the program to run with those exact same .jar files, one running Eclipse Indigo and the other running the same Kepler version as myself. I also was able to open the two .jar files manually and everything appears to be there. After every trial trying to fix this, I have refreshed, cleaned and restarted eclipse. The two other full time guys said they have never seen this error. I would like to get some insight on this from anyone who has any similar experiences so that I don't have to use up much more of their time.

推荐答案

我遇到了这个问题,只是通过从 Libs 目录中删除 .jar 文件然后再次复制->粘贴原始 Jars 来解决的.然后做一个完整的清理 -> 重建

I Had this issue, just fixed by deleting .jar files from Libs directory then copy->paste original Jars again. Then do a complete clean -> rebuild

这篇关于错误:无法读取所需库的存档或不是有效的 ZIP 文件.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆