Skip to content Skip to sidebar Skip to footer

Error While Accessing Shared Preferences Of Android App's First Run

Whenever I run my Android app for the first time after installation and access the shared preferences, I get this system error - remove failed: ENOENT (No such file or directory)

Solution 1:

Remove the if condition, shared preference handles that for you. What i would do is

String setOrNot;
SharedPreferencessharedPref= getSharedPreferences("LastFetchTimeFile",MODE_PRIVATE);

     setOrNot = sharedPref.getString("LastFetchTime", "notSetYet");

Also can you tell me which device/os ?

Post a Comment for "Error While Accessing Shared Preferences Of Android App's First Run"