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
解决方案 »
- 关于Callback函数,通知UI的问题
- 安卓系统语音解码是怎么做的
- 控制台报错:Error in an XML file: aborting build.怎么回事?
- Android CTS4.0测试的fail项怎么办呢?
- phonegap跳转页面时调用本地浏览器
- 求助 i9088无法开机,停在S界面
- 求关于分析Android SDK源码树的书。
- fragment transaction.replace掉之后,原来的fragment为啥还能获取焦点
- eclipse今天突然变回最原始的状态了
- 求linux下android/platform-tools/hprof-conv文件的资源
- 跑马灯的问题
- Android有没有mac地址?
在项目中建立lib目录,将jar文件拷入。