I am getting the following error:
scan = new Scanner(new File("file:///android_lib/"+StationNM+".csv"));
I have 아현.csv
in the lib folder, but android throws FileNotFoundException
.
how can I solve this? adfasdfa
my source is
mport java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Scanner;
import java.lang.Object;
public class model {
public float modelPredict(String StationNM, String UPandDOWN, int day, int hour, int minute)
{
Scanner scan = null;
try {
scan = new Scanner(new File("file:///android_lib/"+StationNM+".csv"));
} catch (FileNotFoundException e) {
e.printStackTrace();
}
ArrayList<String[]> records = new ArrayList<String[]>();
ArrayList<Integer> model_list = new ArrayList<Integer>();
while (scan.hasNext()) {
String[] record;
record = scan.nextLine().split(",");
records.add(record);
}
}
this issue was solved