开发者

Where to keep text files in Android project in eclipse

I am trying to find out, where should I keep text files in my Android project and how to refer their location in the code.

I kept my files under the main project directory and referred in the file as /sample.txt. but this did not work开发者_StackOverflow社区.


I would store it in the assets folder and reference it by using something like

Activity.getAssets().open(sample.txt)


You should keep them in /assets dir. Access them later with AssetManager.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜