InputStream from Assets folder on Android returning empty

android, assets, inputstream, io, java

Solution

The problem was that my file was too big, and was being compressed because of it's ".txt" extension. By renaming the file to a format that is normally compressed, ".mp3", there was no issue

Problem

I'm not getting any exceptions, but when I run... ``` InputStream deckFile = context.getAssets().open("cards.txt"); ``` Then, deckFile.read() returns -1. The file is in the correct folder, and it is NOT empty. This should be the easiest thing in the world... EDIT: The AssetManager is indeed listing "cards.txt" as being there, so that shouldn't be the problem.

Original source