In my code I do this:
import java.nio.file.Files;
import java.nio.file.Paths;
Files.createDirectories(Paths.get(mMyDir));
But I have this error on some android devices:
Failed resolution of: java/nio/file/Paths;
What can I do?
Set your minSdkVersion to 26 or higher, as that class is relatively new.
Alternatively, do not use Paths. Since you have limited access to files on Android Q and higher, you may need to be considering other approaches anyway.
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