java.lang.ArrayIndexOutOfBoundsException: length=1; index=1 when trying to read csv : <p>I have problem when trying to read the csv file, the error appears like this : <code>java.lang.ArrayIndexOutOfBoundsException: length=1; index=1</code> . I have tried searching in StackOverflow, the error appears same as above.</p>

<p>Code :</p>

<pre><code>private void readCSVFile(String csvNameFile) {
    try {
        File readFolderCSV = new File(Environment.getExternalStorageDirectory() + "/Download/" + csvNameFile);
        CSVReader csvReader = new CSVReader(new FileReader(readFolderCSV.getAbsoluteFile()));
        String[] nextLine;
        while((nextLine = csvReader.readNext()) != null) {
            Log.e("TAG", nextLine[0] + nextLine[1] + nextLine[2] + nextLine[3] + nextLine[4]);
        }
    } catch (Exception e) {
        e.printStackTrace();
        Toast.makeText(MasterUoM.this, "The specified file was not found", Toast.LENGTH_SHORT).show();
    }
}
</code></pre>

<p>MyCSVFile :</p>

<p><img src="https://i.stack.imgur.com/TRU71.png" alt="1"></p>
