File external = getExternalFilesDir(null);
//fd is stringbuffer whose value is "year1:semester:2"
File file = new File(external,""+fd.toString()+".txt"); // <----error
FileOutputStream fos = new FileOutputStream(file);
fos.write(store.getBytes());
fos.close();
This is the exception generated:
W/System.err(29169): java.io.FileNotFoundException: /storage/sdcard0/Android/data/com.example.ddu/files/Year:1Semester:2.txt: open failed: EINVAL (Invalid argument)