PC运行正常,安卓运行就报错,请各位帮忙。
源码:
public static void unzip2(String sourceZip,String destDir) throws Exception{
try{
Project p = new Project();
Expand e = new Expand();
e.setProject(p);
e.setSrc(new File(sourceZip));
e.setOverwrite(false);
e.setDest(new File(destDir));
e.setEncoding("UTF-8"); //根据linux系统的实际编码设置
e.execute();
}catch(Exception e){
throw e;
}
} 报错如下:GC freed 640 objects / 50336 bytes in 38ms
Could not find class 'org.apache.tools.ant.Project', referenced from method cn.cmmb.zip2.Decompression.unzip2
VFY: unable to resolve new-instance 93 (Lorg/apache/tools/ant/Project;) in Lcn/cmmb/zip2/Decompression;
VFY: replacing opcode 0x22 at 0x0000
Making a copy of Lcn/cmmb/zip2/Decompression;.unzip2 code (116 bytes)
VFY: unable to find class referenced in signature (Lorg/apache/tools/zip/ZipOutputStream;)
Could not find class 'org.apache.tools.zip.ZipEntry', referenced from method cn.cmmb.zip2.Decompression.zip
VFY: unable to resolve new-instance 95 (Lorg/apache/tools/zip/ZipEntry;) in Lcn/cmmb/zip2/Decompression;
VFY: replacing opcode 0x22 at 0x000b
Making a copy of Lcn/cmmb/zip2/Decompression;.zip code (425 bytes)
Could not find class 'org.apache.tools.zip.ZipEntry', referenced from method cn.cmmb.zip2.Decompression.zip
VFY: unable to resolve new-instance 95 (Lorg/apache/tools/zip/ZipEntry;) in Lcn/cmmb/zip2/Decompression;
VFY: replacing opcode 0x22 at 0x006d
Could not find class 'org.apache.tools.zip.ZipEntry', referenced from method cn.cmmb.zip2.Decompression.zip
VFY: unable to resolve new-instance 95 (Lorg/apache/tools/zip/ZipEntry;) in Lcn/cmmb/zip2/Decompression;
VFY: replacing opcode 0x22 at 0x008c
Could not find class 'org.apache.tools.zip.ZipFile', referenced from method cn.cmmb.zip2.Decompression.unzip
VFY: unable to resolve new-instance 96 (Lorg/apache/tools/zip/ZipFile;) in Lcn/cmmb/zip2/Decompression;
VFY: replacing opcode 0x22 at 0x0014
Making a copy of Lcn/cmmb/zip2/Decompression;.unzip code (635 bytes)
Could not find class 'org.apache.tools.zip.ZipFile', referenced from method cn.cmmb.zip2.Decompression.unzip
VFY: unable to resolve new-instance 96 (Lorg/apache/tools/zip/ZipFile;) in Lcn/cmmb/zip2/Decompression;
VFY: replacing opcode 0x22 at 0x0014
Making a copy of Lcn/cmmb/zip2/Decompression;.unzip code (635 bytes)
Could not find class 'org.apache.tools.zip.ZipOutputStream', referenced from method cn.cmmb.zip2.Decompression.zip
VFY: unable to resolve new-instance 97 (Lorg/apache/tools/zip/ZipOutputStream;) in Lcn/cmmb/zip2/Decompression;
VFY: replacing opcode 0x22 at 0x0001
Making a copy of Lcn/cmmb/zip2/Decompression;.zip code (137 bytes)
Shutting down VM
源码:
public static void unzip2(String sourceZip,String destDir) throws Exception{
try{
Project p = new Project();
Expand e = new Expand();
e.setProject(p);
e.setSrc(new File(sourceZip));
e.setOverwrite(false);
e.setDest(new File(destDir));
e.setEncoding("UTF-8"); //根据linux系统的实际编码设置
e.execute();
}catch(Exception e){
throw e;
}
} 报错如下:GC freed 640 objects / 50336 bytes in 38ms
Could not find class 'org.apache.tools.ant.Project', referenced from method cn.cmmb.zip2.Decompression.unzip2
VFY: unable to resolve new-instance 93 (Lorg/apache/tools/ant/Project;) in Lcn/cmmb/zip2/Decompression;
VFY: replacing opcode 0x22 at 0x0000
Making a copy of Lcn/cmmb/zip2/Decompression;.unzip2 code (116 bytes)
VFY: unable to find class referenced in signature (Lorg/apache/tools/zip/ZipOutputStream;)
Could not find class 'org.apache.tools.zip.ZipEntry', referenced from method cn.cmmb.zip2.Decompression.zip
VFY: unable to resolve new-instance 95 (Lorg/apache/tools/zip/ZipEntry;) in Lcn/cmmb/zip2/Decompression;
VFY: replacing opcode 0x22 at 0x000b
Making a copy of Lcn/cmmb/zip2/Decompression;.zip code (425 bytes)
Could not find class 'org.apache.tools.zip.ZipEntry', referenced from method cn.cmmb.zip2.Decompression.zip
VFY: unable to resolve new-instance 95 (Lorg/apache/tools/zip/ZipEntry;) in Lcn/cmmb/zip2/Decompression;
VFY: replacing opcode 0x22 at 0x006d
Could not find class 'org.apache.tools.zip.ZipEntry', referenced from method cn.cmmb.zip2.Decompression.zip
VFY: unable to resolve new-instance 95 (Lorg/apache/tools/zip/ZipEntry;) in Lcn/cmmb/zip2/Decompression;
VFY: replacing opcode 0x22 at 0x008c
Could not find class 'org.apache.tools.zip.ZipFile', referenced from method cn.cmmb.zip2.Decompression.unzip
VFY: unable to resolve new-instance 96 (Lorg/apache/tools/zip/ZipFile;) in Lcn/cmmb/zip2/Decompression;
VFY: replacing opcode 0x22 at 0x0014
Making a copy of Lcn/cmmb/zip2/Decompression;.unzip code (635 bytes)
Could not find class 'org.apache.tools.zip.ZipFile', referenced from method cn.cmmb.zip2.Decompression.unzip
VFY: unable to resolve new-instance 96 (Lorg/apache/tools/zip/ZipFile;) in Lcn/cmmb/zip2/Decompression;
VFY: replacing opcode 0x22 at 0x0014
Making a copy of Lcn/cmmb/zip2/Decompression;.unzip code (635 bytes)
Could not find class 'org.apache.tools.zip.ZipOutputStream', referenced from method cn.cmmb.zip2.Decompression.zip
VFY: unable to resolve new-instance 97 (Lorg/apache/tools/zip/ZipOutputStream;) in Lcn/cmmb/zip2/Decompression;
VFY: replacing opcode 0x22 at 0x0001
Making a copy of Lcn/cmmb/zip2/Decompression;.zip code (137 bytes)
Shutting down VM
解决方案 »
- JMF 获取多个摄像头来源
- java字符串里换行符的删除方法
- java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading gnu.io.RXTXCommDriver
- 请教:为什么不响应键盘事件呢
- Java与MySQL连接的问题?
- 小问题,看一下
- 怎么设置或修改在Graphics中显示字体时的anti-aliasing属性
- 如何用字符窜初始化char类型数组
- 请问用什么方法可以获取系统时间啊?
- AWT事件的问题?高分!
- 用myeclipse向server中输入中文
- 请问org.apache.http.client在下载文件时如何取得文件大小?
相对路径
<classpathentry kind="lib" path="lib/ant-1.7.1.jar"/>