Doing Android 2.1 development. Can anybody explain to me why the following code generates a IOException and doesn't load the file? This exact code used to work, and as far as I can tell, it should still work. For reference, the Log.d() command correctly lists all files that I expect, and the files are correctly zipped into my .APK file.
AssetManager assetManager = mContext.getAssets();
String[] files = null;
try
{
files = assetManager.list("meshes");
for (int i = 0; i < files.length; i++)
Log.d(TAG, files[i]);
InputStream is = assetManager.open(files[0]);
}
catch (IOException e)
{
Log.e(TAG, "Could not load '" + e.getMessage()+ "'!");
}
Any ideas on why this breaks now? The files I'm trying to read are tiny (couple of bytes) binaries.