2 xyob1 xyob1 于 2017.09.07 14:35 提问

使用poi读取 excel 2007 导入jar包 出现65535问题,把他转移到as上 用MultiDex分包 20C

使用poi读取 excel 2007 导入jar包 出现65535问题,把他转移到as上 用MultiDex分以后可以编译 可生成apk,出现如下错误 。找不到我导入的类。小弟新人。有没有大牛帮小弟解答啊。万分感谢
09-20 18:01:36.329 18141-18141/com.symbol.emdksample D/dalvikvm: GC_FOR_ALLOC freed 314K, 10% free 4528K/4996K, paused 22ms, total 22ms
09-20 18:01:36.489 18141-18141/com.symbol.emdksample W/dalvikvm: VFY: unable to find class referenced in signature (Ljavax/xml/stream/XMLStreamReader;)
09-20 18:01:36.489 18141-18141/com.symbol.emdksample W/dalvikvm: VFY: unable to find class referenced in signature (Ljavax/xml/stream/XMLStreamReader;)
09-20 18:01:36.489 18141-18141/com.symbol.emdksample W/dalvikvm: VFY: unable to find class referenced in signature (Ljavax/xml/stream/XMLStreamReader;)
09-20 18:01:36.519 18141-18141/com.symbol.emdksample D/dalvikvm: GC_FOR_ALLOC freed 411K, 10% free 4672K/5152K, paused 25ms, total 25ms
09-20 18:01:36.519 18141-18141/com.symbol.emdksample W/dalvikvm: VFY: unable to find class referenced in signature (Ljavax/xml/stream/XMLStreamReader;)
09-20 18:01:36.529 18141-18141/com.symbol.emdksample E/dalvikvm: Could not find class 'javax.xml.stream.XMLStreamReader', referenced from method org.apache.xmlbeans.XmlBeans.nodeToXmlStreamReader
09-20 18:01:36.529 18141-18141/com.symbol.emdksample W/dalvikvm: VFY: unable to resolve check-cast 234 (Ljavax/xml/stream/XMLStreamReader;) in Lorg/apache/xmlbeans/XmlBeans;
09-20 18:01:36.529 18141-18141/com.symbol.emdksample D/dalvikvm: VFY: replacing opcode 0x1f at 0x000d
09-20 18:01:36.529 18141-18141/com.symbol.emdksample W/dalvikvm: VFY: unable to find class referenced in signature (Ljavax/xml/stream/XMLStreamReader;)
09-20 18:01:36.539 18141-18141/com.symbol.emdksample W/dalvikvm: Unable to match class for part: 'Ljavax/xml/stream/XMLStreamReader;'
09-20 18:01:36.539 18141-18141/com.symbol.emdksample W/dalvikvm: Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lorg/apache/xmlbeans/XmlBeans;
09-20 18:01:36.549 18141-18141/com.symbol.emdksample E/ExtraVoiceDBManager: exception
org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetException
at org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:62)
at org.apache.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:403)
at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:155)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.(XSSFWorkbook.java:190)
at com.dmfang.longchampscan.ExtraVoiceDBManager.readExcelToDB(ExtraVoiceDBManager.java:140)
at com.dmfang.longchampscan.ExtraVoiceDBManager.(ExtraVoiceDBManager.java:50)
at com.symbol.emdksample.MainActivity$1.onClick(MainActivity.java:156)
at android.view.View.performClick(View.java:4438)
at android.view.View$PerformClick.run(View.java:18422)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5002)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:60)
at org.apache.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:403) 
at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:155) 
at org.apache.poi.xssf.usermodel.XSSFWorkbook.(XSSFWorkbook.java:190) 
at com.dmfang.longchampscan.ExtraVoiceDBManager.readExcelToDB(ExtraVoiceDBManager.java:140) 
at com.dmfang.longchampscan.ExtraVoiceDBManager.(ExtraVoiceDBManager.java:50) 
at com.symbol.emdksample.MainActivity$1.onClick(MainActivity.java:156) 
at android.view.View.performClick(View.java:4438) 
at android.view.View$PerformClick.run(View.java:18422) 
at android.os.Handler.handleCallback(Handler.java:733) 
at android.os.Handler.dispatchMessage(Handler.java:95) 
at android.os.Looper.loop(Looper.java:136) 
at android.app.ActivityThread.main(ActivityThread.java:5002) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:515) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) 
at dalvik.system.NativeStart.main(Native Method) 
Caused by: java.lang.NoClassDefFoundError: javax/xml/stream/XMLStreamReader
at java.lang.Class.getDeclaredConstructorOrMethod(Native Method)
at java.lang.Class.getPublicConstructorOrMethodRecursive(Class.java:480)
at java.lang.Class.getConstructorOrMethod(Class.java:468)
at java.lang.Class.getMethod(Class.java:857)
at org.apache.xmlbeans.XmlBeans.buildMethod(XmlBeans.java:174)
at org.apache.xmlbeans.XmlBeans.buildNodeMethod(XmlBeans.java:195)
at org.apache.xmlbeans.XmlBeans.buildNodeToXmlStreamMethod(XmlBeans.java:242)
at org.apache.xmlbeans.XmlBeans.(XmlBeans.java:133)
at org.openxmlformats.schemas.drawingml.x2006.main.ThemeDocument$Factory.parse(Unknown Source)
at org.apache.poi.xssf.model.ThemesTable.(ThemesTable.java:44)
at java.lang.reflect.Constructor.constructNative(Native Method) 
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 
at org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:60) 
at org.apache.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:403) 
at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:155) 
at org.apache.poi.xssf.usermodel.XSSFWorkbook.(XSSFWorkbook.java:190) 
at com.dmfang.longchampscan.ExtraVoiceDBManager.readExcelToDB(ExtraVoiceDBManager.java:140) 
at com.dmfang.longchampscan.ExtraVoiceDBManager.(ExtraVoiceDBManager.java:50) 
at com.symbol.emdksample.MainActivity$1.onClick(MainActivity.java:156) 
at android.view.View.performClick(View.java:4438) 
at android.view.View$PerformClick.run(View.java:18422) 
at android.os.Handler.handleCallback(Handler.java:733) 
at android.os.Handler.dispatchMessage(Handler.java:95) 
at android.os.Looper.loop(Looper.java:136) 
at android.app.ActivityThread.main(ActivityThread.java:5002) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:515) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) 
at dalvik.system.NativeStart.main(Native Method) 
Caused by: java.lang.ClassNotFoundException: Didn't find class "javax.xml.stream.XMLStreamReader" on path: DexPathList[[zip file "/system/framework/com.symbol.emdk.jar", zip file "/data/app/com.symbol.emdksample-2.apk", zip file "/data/data/com.symbol.emdksample/code_cache/secondary-dexes/com.symbol.emdksample-2.apk.classes2.zip", zip file "/data/data/com.symbol.emdksample/code_cache/secondary-dexes/com.symbol.emdksample-2.apk.classes3.zip", zip file "/data/data/com.symbol.emdksample/code_cache/secondary-dexes/com.symbol.emdksample-2.apk.classes4.zip", zip file "/data/data/com.symbol.emdksample/code_cache/secondary-dexes/com.symbol.emdksample-2.apk.classes5.zip", zip file "/data/data/com.symbol.emdksample/code_cache/secondary-dexes/com.symbol.emdksample-2.apk.classes6.zip"],nativeLibraryDirectories=[/data/app-lib/com.symbol.emdksample-2, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
at java.lang.Class.getDeclaredConstructorOrMethod(Native Method) 
at java.lang.Class.getPublicConstructorOrMethodRecursive(Class.java:480) 
at java.lang.Class.getConstructorOrMethod(Class.java:468) 
at java.lang.Class.getMethod(Class.java:857) 
at org.apache.xmlbeans.XmlBeans.buildMethod(XmlBeans.java:174) 
at org.apache.xmlbeans.XmlBeans.buildNodeMethod(XmlBeans.java:195) 
at org.apache.xmlbeans.XmlBeans.buildNodeToXmlStreamMethod(XmlBeans.java:242) 
at org.apache.xmlbeans.XmlBeans.(XmlBeans.java:133) 
at org.openxmlformats.schemas.drawingml.x2006.main.ThemeDocument$Factory.parse(Unknown Source) 
at org.apache.poi.xssf.model.ThemesTable.(ThemesTable.java:44) 
at java.lang.reflect.Constructor.constructNative(Native Method) 
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 
at org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:60) 
at org.apache.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:403) 
at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:155) 
at org.apache.poi.xssf.usermodel.XSSFWorkbook.(XSSFWorkbook.java:190) 
at com.dmfang.longchampscan.ExtraVoiceDBManager.readExcelToDB(ExtraVoiceDBManager.java:140) 
at com.dmfang.longchampscan.ExtraVoiceDBManager.(ExtraVoiceDBManager.java:50) 
at com.symbol.emdksample.MainActivity$1.onClick(MainActivity.java:156) 
at android.view.View.performClick(View.java:4438) 
at android.view.View$PerformClick.run(View.java:18422) 
at android.os.Handler.handleCallback(Handler.java:733) 
at android.os.Handler.dispatchMessage(Handler.java:95) 
at android.os.Looper.loop(Looper.java:136) 
at android.app.ActivityThread.main(ActivityThread.java:5002) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:515) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) 
at dalvik.system.NativeStart.main(Native Method) 

1个回答

dcxy0
dcxy0   Ds   Rxr 2017.09.07 16:35

那就用jxl不就行了?

生成不了报错了没??

xyob1
xyob1 客户要兼容2007版的。报错了 就是说内存不足。我把项目导入as里 也是说内存不足。错误是:Error:Execution failed for task ':MC40SaoMao:transformClassesWithDexForDebug'. > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_101\bin\java.exe'' finished with non-zero exit value 1
2 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片