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

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!

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • Ota Update in AOSP
    via Stack Overflow by Kaustav Das
    ,
    • 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.<init>(FileOutputStream.java:87) at java.io.FileWriter.<init>(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) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704)

    Users with the same issue

    Pierre
    Pierre1 times, last one,
    Indri Yunita
    Indri Yunita2 times, last one,
    Adrien
    Adrien4 times, last one,
    maxxi
    maxxi806 times, last one,
    Aria Pahlavan
    Aria Pahlavan2 times, last one,
    96 more bugmates