Android Resource leak try
<p>Below are my codes, I'm having this weird warning: <code>Resource leak: 'br' is never closed</code> . Could anyone help me with this warning. I do not want my app to crash or cause any problems in the future.</p>

<pre><code>File sdcard = Environment.getExternalStorageDirectory();
File file = new File(sdcard,"/St/"+ textToPass);
StringBuilder text = new StringBuilder();
try {
    BufferedReader br = new BufferedReader(new FileReader(file));
    String line;
    while ((line = br.readLine()) != null) {
        text.append(line);
        text.append('\n');
    }           
}catch (IOException e) {
    Toast.makeText(getApplicationContext(),"Error reading file!",Toast.LENGTH_LONG).show();
    e.printStackTrace();
}
TextView output=(TextView) findViewById(R.id.st); 
// Assuming that 'output' is the id of your TextView
output.setText(text);
</code></pre>
