Is it possible to read a raw text file without Context reference in an Android library project
问题 I could put a text file in folder res\raw of a library project, but reading it seems to require a Context reference. Could anyone shed some light on this? 回答1: Check out my answer here to see how to read file from POJO. Generally, the res folder should be automatically added into project build path by ADT plugin. suppose you have a test.txt stored under res/raw folder, to read it without android.content.Context: String file = "raw/test.txt"; // res/raw/test.txt also work. InputStream in =