我应该如何解决
File root = new File(Environment.getExternalStorageDirectory() + File.separator + getResources().getString(R.string.app_name) + File.separator);
root.mkdirs();
File sdImageMainDirectory = new File(root, fileName);
output = new FileOutputStream(sdImageMainDirectory);
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, output);
output.flush();
result = true;
} catch (Exception e) {
e.printStackTrace();
} finally {
if (null != output) {
try {
output.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return result;
}strong text