0

NullPointerException – Attempt to get length of null array – java android

at for(int i=0; i < files.length; i++){

File file =new File(directory);
File[] listfiles=file.listFiles();

Any idea? removing the exception

Asked question