问题描述
我想要包含在我的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!
推荐答案
使用资产
或 raw 文件夹来保存该文件。欲了解更多信息,请参阅
Use assets
or raw
folder in your android folders structure to keep that file. For more info read this
这篇关于在Android中的目录中放置文本文件的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!