【发布时间】:2011-02-01 22:40:44
【问题描述】:
我正在尝试打开一个 xml 文件来解析它,但我正在停止尝试打开该文件。我的代码是:
try {
return new FileInputStream(location);
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return null;
}
其中位置是传递给函数的字符串。运行我的代码后,我得到:
java.io.FileNotFoundException: /C:/Users/Seth/AndroidWorkspace/UCoupon/res/xml/information.xml(没有这样的文件或目录)
我提供了完整的文件路径,我没有拼错任何东西。我做错了什么?
【问题讨论】:
标签: android filenotfoundexception fileinputstream