Search code examples
javaandroidcsvopencsv

getAssets().open doesn't open my .csv file


I want to assignt my CSVreader from the openCSV api to a CSV file, but it can't find it, as I get an "cannot resolve symbol" error.

code:

 CSVReader csvReader = new CSVReader(getAssets().open(testCSV.csv));

I'm using Android Studio, and the file is located under src/main/assets/


Solution

  • This probably means testCSV.csv needs to be a string so "testCSV.csv" with the quotes