Reading file from assets directory throws FileNotFoundException
问题 I'm trying to read in a text file of a bunch of words that I want to use for a word game I am writing. This list is stored in the assets directory and is a txt file. But, whenever I attempt to open it, it throws an exception. List<String>wordList = new ArrayList<String>(); BufferedReader br = null; try { br = new BufferedReader(new InputStreamReader(getAssets().open("wordlist.txt"))); //throwing a FileNotFoundException? String word; while((word=br.readLine()) != null) wordList.add(word); /