【发布时间】:2016-07-04 13:02:30
【问题描述】:
version.properties 位于文件夹的根目录中。我正在从 gradle 读取这个文件。现在我想从活动中读取相同的内容。我怎样才能阅读这个文件。
我在以下代码中得到文件没有异常:
File file = new File("/module/version.properties");
FileInputStream fis;
String content = "";
try {
fis = openFileInput(file);
} catch (IOException e) {
e.printStackTrace();
}
【问题讨论】:
标签: android filereader