此代码抛出一个错误,但代码很简单,我无法理解什么是错误的(我不确定是什么错误 - 它只是导致Android设备关闭说它意外地不得不关闭)
public static void load(Context context){
InputStream is;
AssetManager am = context.getAssets();
try {
is = am.open("lake1ex.xls");
Workbook w= Workbook.getWorkbook(is);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (BiffException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
错误日志:
02-21 12:39:46.358: W/ActivityNative(20745): send
ACTIVITY_IDLE_TRANSACTION 02-21 12:39:50.748: W/dalvikvm(20745): VFY:
unable to resolve static method 5434: Ljxl/Workbook;.getWorkbook
(Ljava/io/InputStream;)Ljxl/Workbook; 02-21 12:39:50.748:
W/dalvikvm(20745): VFY: unable to resolve exception class 859
(Ljxl/read/biff/BiffException;) 02-21 12:39:50.748: W/dalvikvm(20745):
VFY: unable to find exception handler at addr 0x13 02-21 12:39:50.748:
W/dalvikvm(20745): VFY: rejected Lcom/example/dcarp/LoadLake;.load
(Landroid/content/Context;)V 02-21 12:39:50.748: W/dalvikvm(20745):
VFY: rejecting opcode 0x0d at 0x0013 02-21 12:39:50.748:
W/dalvikvm(20745): VFY: rejected Lcom/example/dcarp/LoadLake;.load
(Landroid/content/Context;)V 02-21 12:39:50.748: W/dalvikvm(20745):
Verifier rejected class Lcom/example/dcarp/LoadLake;