Note that there are some explanatory texts on larger screens.

plurals
  1. POandroid openFileOutput and file not created
    primarykey
    data
    text
    <p>I have a problem with the openFileOutput method <a href="http://developer.android.com/reference/android/content/Context.html#openFileOutput(java.lang.String" rel="nofollow noreferrer">http://developer.android.com/reference/android/content/Context.html#openFileOutput(java.lang.String</a>, int)</p> <p>The documentation mentionned : "Creates the file if it doesn't already exist"</p> <p>And I get this error :</p> <pre><code>System.err java.io.FileNotFoundException: /data/data/****/files/conf.properties: open failed: ENOENT (No such file or directory) System.err at libcore.io.IoBridge.open(IoBridge.java:406) System.err at java.io.FileInputStream.&lt;init&gt;(FileInputStream.java:78) System.err at android.app.ContextImpl.openFileInput(ContextImpl.java:642) System.err at android.content.ContextWrapper.openFileInput(ContextWrapper.java:159) System.err at com.ecab.file.ManageText.getString(ManageText.java:25) System.err at com.ecab.ConnectionActivity.initTexts(ConnectionActivity.java:67) System.err at com.ecab.ConnectionActivity.setAfterViews(ConnectionActivity.java:61) System.err at com.ecab.ConnectionActivity_.afterSetContentView_(ConnectionActivity_.java:105) System.err at com.ecab.ConnectionActivity_.setContentView(ConnectionActivity_.java:111) System.err at com.ecab.ConnectionActivity_.onCreate(ConnectionActivity_.java:32) System.err at android.app.Activity.performCreate(Activity.java:4465) System.err at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049) System.err at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2033) System.err at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2104) System.err at android.app.ActivityThread.access$600(ActivityThread.java:132) System.err at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1157) System.err at android.os.Handler.dispatchMessage(Handler.java:99) System.err at android.os.Looper.loop(Looper.java:137) System.err at android.app.ActivityThread.main(ActivityThread.java:4575) System.err at java.lang.reflect.Method.invokeNative(Native Method) System.err at java.lang.reflect.Method.invoke(Method.java:511) System.err at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789) System.err at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556) System.err at dalvik.system.NativeStart.main(Native Method) System.err Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory) System.err at libcore.io.Posix.open(Native Method) System.err at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110) System.err at libcore.io.IoBridge.open(IoBridge.java:390) System.err ... 23 more </code></pre> <p>I found a similar post here : <a href="https://stackoverflow.com/questions/5034575/openfileoutput-filenotfoundexception">openFileOutput FileNotFoundException</a> but there is no reason to explain the problem. so my question is why my file is not created if it doesn't exist ?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload