If you get SharedPreferences
instance via Context.getSharedPreferences("X")
, then your file will be named X.xml
.
It will be located at /data/data/com.your.package.name/shared_prefs/X.xml
. You can just delete that file from the location. Also check /data/data/com.your.package.name/shared_prefs/X.bak
file, and if it exists, delete it too.
But be aware, that SharedPreferences
instance saves all data in memory. So you'll need to clear preferences first, commit changes and only then delete preferences backing file.
This should be enough to implement your design decision.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…