Hello! I have the following error.
java.lang.NullPointerException: Attempt to invoke virtual method ‘java.lang.String com.dl…Crime.getPhotoFilename()’ on a null object reference
public File getPhotoFile(Crime crime) {
File filesDir = mContext.getFilesDir();
return new File(filesDir, crime.getPhotoFilename());
}
public String getPhotoFilename() {
return "CRIME_" + getId().toString() + ".jpg";
}
Why?