open failed: ENOENT (No such file or directory)
1. Error description
The following error occurred while writing the file to sdcard:
open failed: ENOENT (No such file or directory)
2. Error analysis
At first, I thought I forgot to add read-write permission, which was checked.
Finally, when I think of android10 onwards, in addition to the dynamic application of permissions, you must add in the Application node of AndroidManifest.xml of the main application.
android:requestLegacyExternalStorage="true"
3. Solution
Add the following codes in the Application node of AndroidManifest.xml of the main application:
android:requestLegacyExternalStorage="true"
Read More:
- [Solved] fatal error C1083: Could Not Open Unable to open include file:“stdint.h”: No such file or directory
- [619]libgtk-3.so.0 or libXt.so.6: cannot open shared object file: No such file or directory
- [Solved] ERROR: Could not open requirements file: [Errno 2] No such file or directory : ‘requirments.txt‘
- [Solved] import cv2 Error: ImportError: libGL.so.1: cannot open shared object file: No such file or directory
- [Solved] import mxnet Error: OSError: libcudart.so.8.0: cannot open shared object file: No such file or directory
- ./popins2: error while loading shared libraries: libbifrost.so: cannot open shared object file: No such file or directory
- error while loading shared libraries: lib*.so: cannot open shared object file: No such file or directory
- [Solved] ./my_cmake_exe: error while loading shared libraries: libswresample.so.4: cannot open shared object file: No such file or directory
- [Solved] fatal error C1083: Cannot open included files: “stdafx.h”: No such file or directory
- VSCode Unable to find custom header file directory: fatal error: no such file or directory
- Keil Compile Error: ..\OBJ\USART.axf: error: L6002U: Could not open file ..\obj\sys.o: No such file or directory
- [Solved] grafana Startup Error: failed to parse “/etc/grafana/grafana.ini“: open /etc/grafana/grafana.ini: no such file or directory
- [Solved] MAC Nginx Error: ginx.pid“ failed (2: No such file or directory)
- [Solved] Linux Start jar Error: nohup: failed to run command ‘java‘: No such file or directory
- crtdbg.h No such file or directory error [How to Solve]
- [Solved] fatal error: Eigen/Geometry: No such file or directory
- [Solved] PostgreSQL Error: Could not connect to server: no such file or directory
- C++: fatal error: variant: No such file or directory
- Android 10 open file exception open failed: eacces (permission denied) android:requestLegacyExternalStorage= “true“
- fatal error: libusb.h: No such file or directory [How to Solve]