in my app I create a new dir in this way;
File mydir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), "/my_directory");
if (!mydir.exists()) {
mydir.mkdirs();
}
and it works well, but Android Studio (0.8.9) just continues to report me this warning:
Result of "File.mkdirs()" is ignored
Anyone can explain me why? Thank you.
because you dont do anything with what it returns, you just ignore it
ex.
if(mydir.mkdirs()){
//do something
}else{
//do something else
}
you dont need to do anything, its just a warning
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With