java.io.FileNotFoundException

/e:/fileName.txt: open failed: ENOENT (No such file or directory)

Samebug tips1

Check if android.permission.WRITE_EXTERNAL_STORAGE is in AndroidManifest.xml. Also, add checks in your code to see if the storage is available to write before trying to write. And last: create a folder to put your files inside.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web313

  • Stack trace

    • java.io.FileNotFoundException: /e:/fileName.txt: open failed: ENOENT (No such file or directory) at libcore.io.IoBridge.open(IoBridge.java:416) at java.io.FileOutputStream.<init>(FileOutputStream.java:100) at java.io.FileOutputStream.<init>(FileOutputStream.java:85) at com.example.itesterror.MainActivity.onCreate(MainActivity.java:51) at android.app.Activity.performCreate(Activity.java:5045) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1101) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2031) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2092) at android.app.ActivityThread.access$600(ActivityThread.java:133) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1203) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4802) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:809) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576) at dalvik.system.NativeStart.main(Native Method) Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory) at libcore.io.Posix.open(Native Method) at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110) at libcore.io.IoBridge.open(IoBridge.java:400)

    Write tip

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

    Users with the same issue

    filipebatistafilipebatista
    Once,
    justCodeitjustCodeit
    619 times, last one
    gauravgaurav
    39 times, last one
    Alexandru PopaAlexandru Popa
    Once,
    Agócs TamásAgócs Tamás
    5 times, last one
    43 more bugmates