我刚开始使用Android Studio.我不知道在哪里放置我自己的属性文件,因为项目结构中没有assets文件夹.
已发布的代码段在eclipse中工作正常,但在Android Studio中却没有.
码:
Properties prop = new Properties();
try {
//load a properties file
prop.load(new FileInputStream("app.properties"));
//get the property value and print it out
System.out.println(prop.getProperty("server_address"));
} catch (IOException ex) {
ex.printStackTrace();
}
Run Code Online (Sandbox Code Playgroud)
问题1: 在Android Studio(v0.5.8)中放置我自己的属性文件的位置?
问题2: 我如何访问它们?