我开发了应用程序来显示数据库中的详细信息列表..数据从excel文件中提取并存储到数据库中。从excel读取内容时,我收到错误: java.lang.VerifyError:p41.android.consol.products.StartSectionActivity
我的代码在这里:
公共类StartSectionActivity扩展了Activity {
Context context=this;
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
super.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.product);
try {
//int resourceId = context.getResources().getIdentifier("p41.android.consol.products:raw/products.xls", null, null);
//File f = new File(context.getResources().openRawResource(resourceId));
File excel=new File("p41.android.consol.products:raw/products.xls");
Workbook book=Workbook.getWorkbook(excel);
Sheet sheet1=book.getSheet(0);
Cell a1=sheet1.getCell(0, 0);
Log.d("Cell Value!", a1.getContents());
/*String files[]=getResources().getAssets().list(null);
Log.d("files", files[0]);*/
//InputStream stream=getResources().getAssets().open("PRODUCT_MASTER.xls");
} catch (BiffException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}