title: Android: Neither res/raw files nor assets can be loaded
body: <p>I try to load a .ini file in android, but it doesn't work. Until now I have tried the following two ways:</p>
  
  <p>Load file from res/raw folder:</p>
  
  <pre><code>int fileId = context.getResources().getIdentifier(fileName, "raw", context.getPackageName());
  bufferedReader = new BufferedReader(new InputStreamReader(Resources.getSystem().openRawResource(fileId)));
  
  // I tried this too:
  //context.getResources().openRawResource(fileId)));
  </code></pre>
  
  <p>I first thought that the context might be the problem but the getIdentifier() method returns the correct R.raw id, and at openRawResource() the logcat always shows this:</p>
  
  <pre><code>03-17 00:17:41.627: W/ResourceType(28752): No known package when getting value for resource number 0x7f040000
  03-17 00:17:41.627: W/System.err(28752): android.content.res.Resources$NotFoundException: Resource ID #0x7f040000
  </code></pre>
  
  <p>And when I try to load the file from the /assets directory:</p>
  
  <pre><code>AssetManager assetManager = context.getAssets();
  bufferedReader = new BufferedReader(new InputStreamReader(assetManager.open(fileName)));
  </code></pre>
  
  <p>...I always get the FileNotFoundException:</p>
  
  <pre><code>03-17 00:33:32.006: W/System.err(30447): java.io.FileNotFoundException: /file.ini: open failed: ENOENT (No such file or directory)
  </code></pre>
  
  <p>I hope someone can help me solving this, I just don't know where to look. I also searched and found similar problems on the internet, but no solution.</p>