java.io.FileNotFoundException: /storage/emulated/0/MyLogger/test.log: open failed: ENOENT (No such file or directory)

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

Before using FileOutputStream check that there's no directory or file with the same name you're trying to use. Trying to remove it works as well. Try using FileAsyncHttpResponseHandler(context) as well!

Solutions on the web

via Stack Overflow by Alex
, 1 year ago
/storage/emulated/0/MyLogger/test.log: open failed: ENOENT (No such file or directory)
via Stack Overflow by CMLDMR
, 1 year ago
/data/data/org.qtproject.serikbelediyesi/lib/libplugins_platforms_libqoffscreen.so: open failed: ENOENT (No such file or directory)
via Stack Overflow by future engineer
, 8 months ago
/storage/emulated/0/CrowdSensingData: open failed: EACCES (Permission denied)
via GitHub by 920-Text-Editor-User
, 5 months ago
/storage/emulated/0/data/user/0/com.samsung.android.app.FileShareServer/files/xml/untitled.txt: open failed: ENOENT (No such file or directory)
via GitHub by 920-Text-Editor-User
, 5 months ago
/storage/emulated/0/Browser/Others/superfly326/lang/superfly-menu-es_ES.po: open failed: ENOENT (No such file or directory)
via GitHub by 920-Text-Editor-User
, 8 months ago
/storage/sdcard0/Download/simple-email-form-v1/index.php: open failed: ENOENT (No such file or directory)
java.io.FileNotFoundException: /storage/emulated/0/MyLogger/test.log: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:456)
at java.io.FileOutputStream.(FileOutputStream.java:87)
at java.io.FileWriter.(FileWriter.java:58)
at com.example.alexander.bootservice.Logger.init(Logger.java:34)
at com.example.alexander.bootservice.Logger.log(Logger.java:45)
at com.example.alexander.bootservice.Logger.d(Logger.java:65)
at com.example.alexander.bootservice.MainActivity.onCreate(MainActivity.java:12)
at android.app.Activity.performCreate(Activity.java:5977)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2258)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2365)
at android.app.ActivityThread.access$800(ActivityThread.java:148)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1283)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5272)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:909)

Users with the same issue

103 times, 1 year ago
5 times, 1 month ago
Once, 3 months ago
Once, 4 months ago
Once, 1 year ago
100 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.