title: Android Reading a Text File
body: <p>I am making a project in Android Studio, I have a text file in my project folder, each time I compile, I want my code to read that .txt file. When everythings finished, I want that .txt file to be inside .apk file. I am not trying to read from SD card etc.</p>
  
  <p>But I am getting "File not found Exception" each time I compile. While using eclipse, when you place the .txt file in same directory as your project, code can find .txt file without problems but in Android Studio, it cannot find text file I just created. Where do I have to place my .txt file inside my project folder?<br>
  Here is the code: </p>
  
  <pre><code>FileReader in = new FileReader("TEXTgreetingKeywords.txt"); 
  final BufferedReader br = new BufferedReader(new InputStreamReader(in));
  </code></pre>
  
  <p>I used to same method to read text file in Java. I don't understand why it isn't working on Android since it uses Java too.</p>
  
  <p>EDIT------</p>
  
  <p>I used asset manager but I got the same error again</p>
  
  <pre><code>AssetManager asset = getAssets();
      try {
           in = asset.open("text.txt");
      } catch (IOException e) {
          e.printStackTrace();
      }
  </code></pre>
  
  <p>Do I have to change the directory to something like "C:\App\main\text.txt" ?</p>