在Android中的目录中放置文本文件的位置 [英] Where to put text files in directory in Android

查看:178
本文介绍了在Android中的目录中放置文本文件的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要包含在我的Android应用程序中的文本文件,它不是字符串文件,而是标准文本文件。它包含定义在板上绘制的地图特征的数据。该文件不是XML文件,所以我不确定我应该把它放在哪里,或者这对于android来说这不是一个好的文件结构?你想这样做吗?如果你是在那个目录下,你想把它们放在哪个目录下?你怎么想访问该文件?我知道如何使用FileInputStreams和FileOutputStreams我只需要知道如何访问该文件。欢迎并赞赏所有相关答案!

I have a text file i want to include in my Android application, it is not a string file it is a standard text file. It contains data that defines the characteristics of a "map" that is drawn on a board. The file is not an XML file so i am unsure where i should put it or if this isn't good file structure for android? Are you suppose to do this? If you are then under what directory are you suppose to put them? How then are you suppose to access the file? I know how to use FileInputStreams and FileOutputStreams i just need to know how to access the file. All relevant answers are welcome and appreciated!

推荐答案

使用资产或<你的android文件夹结构中的code> raw 文件夹来保存该文件。欲了解更多信息,请参阅

Use assets or raw folder in your android folders structure to keep that file. For more info read this

这篇关于在Android中的目录中放置文本文件的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆